Vector kit command
swatch.list
Swatches
Answers the document's swatches (colours, tints, gradients, patterns) with their kind, group, global/spot flags and colour values.
- Kit
- Vector 0.1.0 (.kvector)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
group | string | no | only that colour group's swatches |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "swatch.list" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: group. vector_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
groups | object[] | no | |
swatches | object[] | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"groups": {
"items": {
"additionalProperties": true,
"properties": {
"name": {
"type": "string"
},
"swatches": {
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"swatches": {
"items": {
"additionalProperties": true,
"properties": {
"color": {
"additionalProperties": true,
"type": "object"
},
"global": {
"type": "boolean"
},
"gradient": {
"type": "string"
},
"group": {},
"hex": {
"type": "string"
},
"kind": {
"type": "string"
},
"name": {
"type": "string"
},
"spot": {
"type": "boolean"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"group": {
"description": "only that colour group's swatches",
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"SwatchGroup"
]
}
},
"returns": "{swatches: [{name, kind: \"none\"|\"color\"|\"gradient\"|\"pattern\", group, global, spot, color?, hex?, tintOf?: base swatch of a tint swatch, tint?: its %, gradient?: linear|radial|freeform, angle?, stops?: [{offset, color, hex, opacity, midpoint}] (a gradient's), pattern?}] (the built-in [Registration] after None: it prints on every plate and can't be edited, moved or deleted), groups: [{name, swatches: [names]}]}",
"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.