Slide kit command
slide.background
Format Background
Sets the background of the current slide to a color, gradient, picture or style, or resets it to the layout's; with `all` it is applied to all (Apply to All): the slide masters and layouts take it and the slides drop their own, so slides added later have it too.
- Kit
- Slide 0.1.0 (.kslide and .pptx)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
all | boolean | no | Apply to All: the masters and layouts take it, so new slides do too |
color | string | no | |
gradient | any | no | |
index | integer | no | a position counted from 0 (the first is 0) |
pattern | object | no | {preset, fg, bg} |
picture | any | no | base64 |
reset | any | no | |
style | integer (≥ 1, ≤ 12) | no | 1 to 12 |
Call through slide_run
slide_run {
"path": "<file>.pptx",
"steps": [{ "command": "slide.background" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: all, color, gradient, index, pattern, picture, reset, style. slide_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"all": {
"description": "Apply to All: the masters and layouts take it, so new slides do too",
"type": "boolean"
},
"color": {
"type": "string"
},
"gradient": {},
"index": {
"description": "a position counted from 0 (the first is 0)",
"type": "integer"
},
"pattern": {
"additionalProperties": true,
"description": "{preset, fg, bg}",
"properties": {
"bg": {},
"fg": {},
"preset": {
"type": "string"
}
},
"type": "object"
},
"picture": {
"description": "base64"
},
"reset": {},
"style": {
"description": "1 to 12",
"maximum": 12,
"minimum": 1,
"type": "integer"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (slide_commands through @kition/[email protected], built from KitionAI/kition-slide@7ef3d11). As data: commands.jsonl.