Layout kit command
color.convert
Convert Color
Converts a colour between RGB, CMYK and gray with the working profiles; changes nothing.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
color | object | no | {model: rgb, r, g, b} or {model: cmyk, c, m, y, k} |
to | "rgb" | "cmyk" | "gray" | "lab" | no |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "color.convert" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: color, to. layout_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
c | number | no | |
k | number | no | |
m | number | no | |
model | string | no | |
y | number | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"c": {
"type": "number"
},
"k": {
"type": "number"
},
"m": {
"type": "number"
},
"model": {
"type": "string"
},
"y": {
"type": "number"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"color": {
"additionalProperties": true,
"description": "{model: rgb, r, g, b} or {model: cmyk, c, m, y, k}",
"type": "object"
},
"to": {
"enum": [
"rgb",
"cmyk",
"gray",
"lab"
],
"type": "string"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.