Slide kit command
shape.fill
Shape Fill
Sets the fill: a color, none, a gradient, a picture or a pattern. Applies to the shapes in `ids` (on slide `onSlide`, from 1) or else the selection.
- Kit
- Slide 0.1.0 (.kslide and .pptx)
- Changes the document
- yes
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
color | string | no | one of several alternative parameters |
gradient | object | no | {stops: [[pos, color]], angle?, kind?: linear|radial}; one of several alternative parameters |
ids | (integer | string)[] | no | |
none | boolean | no | one of several alternative parameters |
onSlide | integer | no | the slide the ids are on, from 1 |
pattern | object | no | {preset, fg, bg}; one of several alternative parameters |
picture | any | no | base64; one of several alternative parameters |
reset | boolean | no | one of several alternative parameters |
transparency | number | no | 0 to 1; one of several alternative parameters |
Call through slide_run
text
slide_run {
"path": "<file>.pptx",
"steps": [{ "command": "shape.fill" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: color, gradient, ids, none, onSlide, pattern, picture, reset, transparency. 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": {
"color": {
"description": "one of several alternative parameters",
"type": "string"
},
"gradient": {
"additionalProperties": true,
"description": "{stops: [[pos, color]], angle?, kind?: linear|radial}; one of several alternative parameters",
"properties": {
"angle": {
"type": "number"
},
"kind": {
"enum": [
"linear",
"radial"
],
"type": "string"
},
"stops": {
"description": "[[pos, color]]",
"items": {
"type": "array"
},
"type": "array"
}
},
"type": "object"
},
"ids": {
"items": {
"description": "an id",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array",
"x-khp-types": [
"Shape"
]
},
"none": {
"default": true,
"description": "one of several alternative parameters",
"type": "boolean"
},
"onSlide": {
"description": "the slide the ids are on, from 1",
"type": "integer"
},
"pattern": {
"additionalProperties": true,
"description": "{preset, fg, bg}; one of several alternative parameters",
"properties": {
"bg": {},
"fg": {},
"preset": {
"type": "string"
}
},
"type": "object"
},
"picture": {
"description": "base64; one of several alternative parameters"
},
"reset": {
"default": true,
"description": "one of several alternative parameters",
"type": "boolean"
},
"transparency": {
"description": "0 to 1; one of several alternative parameters",
"type": "number"
}
},
"type": "object",
"x-khp-position": "independent"
}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.