Vector kit command
swatch.edit
Swatch Options
Changes a swatch: its name, colour or colour mode, global and spot flags, or replaces its paint; linked art updates.
- Kit
- Vector 0.1.0 (.kvector)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
color | string | no | e.g. {l, a, b} for a Lab colour |
global | boolean | no | |
ids | any[] | no | read by the command beside its listed parameters |
mode | "gray" | "rgb" | "hsb" | "lab" | "cmyk" | "web" | no | convert the colour |
name | string | no | |
newName | string | no | |
paint | object | no | |
spot | boolean | no |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "swatch.edit" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: color, global, ids, mode, name, newName, paint, spot. 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": {
"color": {
"description": "e.g. {l, a, b} for a Lab colour",
"type": "string"
},
"global": {
"type": "boolean"
},
"ids": {
"description": "read by the command beside its listed parameters",
"type": "array"
},
"mode": {
"description": "convert the colour",
"enum": [
"gray",
"rgb",
"hsb",
"lab",
"cmyk",
"web"
],
"type": "string"
},
"name": {
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"Swatch"
]
},
"newName": {
"type": "string"
},
"paint": {
"additionalProperties": true,
"type": "object"
},
"spot": {
"type": "boolean"
}
},
"returns": "{name, relinked: paints changed}",
"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.