Vector kit command

edit.colors.adjustBalance

Adjust Color Balance…

Shifts the selection's colours by per-channel amounts in RGB, CMYK, grey or global tint mode; answers how many changed.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of edit.colors.adjustBalance
NameTypeRequiredDescription
banynoone of several alternative parameters
canynoone of several alternative parameters
convertbooleannotrue: the results stay in the adjusted model; false: each colour keeps its own
fillbooleanno
gnumberno
grayintegerno-100 to 100; % added per channel, default 0; `tint` is global mode: it shifts the tints of colours and gradient stops linked to global and spot swatches, which stay linked, and leaves other colours and images alone; one of several alternative parameters
idsinteger[]noobject IDs
includeImagesbooleanno
includePatternsbooleanno
kintegerno-100 to 100; % added per channel, default 0; `tint` is global mode: it shifts the tints of colours and gradient stops linked to global and spot swatches, which stay linked, and leaves other colours and images alone; one of several alternative parameters
mnumberno
mode"rgb" | "cmyk" | "gray" | "global"nodefault: from the channels given
rnumberno
strokebooleanno
tintintegerno-100 to 100; % added per channel, default 0; `tint` is global mode: it shifts the tints of colours and gradient stops linked to global and spot swatches, which stay linked, and leaves other colours and images alone; one of several alternative parameters
ynumberno

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "edit.colors.adjustBalance" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: b, c, convert, fill, g, gray, ids, includeImages, includePatterns, k, m, mode, r, stroke, tint, y. 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": {
    "b": {
      "description": "one of several alternative parameters"
    },
    "c": {
      "description": "one of several alternative parameters"
    },
    "convert": {
      "default": false,
      "description": "true: the results stay in the adjusted model; false: each colour keeps its own",
      "type": "boolean"
    },
    "fill": {
      "type": "boolean"
    },
    "g": {
      "type": "number"
    },
    "gray": {
      "description": "-100 to 100; % added per channel, default 0; `tint` is global mode: it shifts the tints of colours and gradient stops linked to global and spot swatches, which stay linked, and leaves other colours and images alone; one of several alternative parameters",
      "type": "integer"
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "includeImages": {
      "type": "boolean"
    },
    "includePatterns": {
      "type": "boolean"
    },
    "k": {
      "description": "-100 to 100; % added per channel, default 0; `tint` is global mode: it shifts the tints of colours and gradient stops linked to global and spot swatches, which stay linked, and leaves other colours and images alone; one of several alternative parameters",
      "type": "integer"
    },
    "m": {
      "type": "number"
    },
    "mode": {
      "description": "default: from the channels given",
      "enum": [
        "rgb",
        "cmyk",
        "gray",
        "global"
      ],
      "type": "string"
    },
    "r": {
      "type": "number"
    },
    "stroke": {
      "type": "boolean"
    },
    "tint": {
      "description": "-100 to 100; % added per channel, default 0; `tint` is global mode: it shifts the tints of colours and gradient stops linked to global and spot swatches, which stay linked, and leaves other colours and images alone; one of several alternative parameters",
      "type": "integer"
    },
    "y": {
      "type": "number"
    }
  },
  "returns": "{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.