Vector kit command
swatch.editGroup
Edit Color Group
Rewrites a colour group's colours in order (adding or removing swatches as needed) and optionally renames it.
- Kit
- Vector 0.1.0 (.kvector)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
colors | string[] | no | hex, key, {c,m,y,k} or {l,a,b}; the group's swatches take them in order, extra colours become new swatches, swatches past the end are removed; built-in swatches can't change |
group | string | no | |
ids | any[] | no | read by the command beside its listed parameters |
rename | string | no |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "swatch.editGroup" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: colors, group, ids, rename. vector_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": {
"colors": {
"description": "hex, key, {c,m,y,k} or {l,a,b}; the group's swatches take them in order, extra colours become new swatches, swatches past the end are removed; built-in swatches can't change",
"items": {
"description": "a colour such as #rrggbb",
"type": "string"
},
"type": "array"
},
"group": {
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"SwatchGroup"
]
},
"ids": {
"description": "read by the command beside its listed parameters",
"type": "array"
},
"rename": {
"type": "string"
}
},
"returns": "{name, swatches: [names], relinked}",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.