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

Parameters of color.convert
NameTypeRequiredDescription
colorstringno
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

Result of color.convert
NameTypeRequiredDescription
deltaEanyno
hexanyno
labany[]no
modelanyno
outOfGamutanyno
valuesanyno
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.