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

Parameters of slide.background
NameTypeRequiredDescription
allbooleannoApply to All: the masters and layouts take it, so new slides do too
colorstringno
gradientanyno
indexintegernoa position counted from 0 (the first is 0)
patternobjectno{preset, fg, bg}
pictureanynobase64
resetanyno
styleinteger (≥ 1, ≤ 12)no1 to 12

Call through slide_run

text
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

json
{
  "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.