Vector kit command
color.convert
Convert Color
Converts a colour to RGB, CMYK, grey or Lab through the working spaces and answers its values, hex and whether it is out of gamut.
- Kit
- Vector 0.1.0 (.kvector)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
color | string | no | |
intent | "perceptual" | "relative" | "saturation" | "absolute" | no | |
to | "rgb" | "cmyk" | "gray" | "lab" | no |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "color.convert" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: color, intent, to. vector_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
deltaE | any | no | |
hex | any | no | |
lab | any[] | no | |
model | any | no | |
outOfGamut | any | no | |
values | any | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"deltaE": {},
"hex": {},
"lab": {
"type": "array"
},
"model": {},
"outOfGamut": {},
"values": {}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"color": {
"type": "string"
},
"intent": {
"enum": [
"perceptual",
"relative",
"saturation",
"absolute"
],
"type": "string"
},
"to": {
"enum": [
"rgb",
"cmyk",
"gray",
"lab"
],
"type": "string"
}
},
"returns": "{model, values, hex, lab: [L,a,b], outOfGamut, deltaE}",
"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.