Vector kit command

swatch.delete

Delete Swatch

Deletes swatches or colour groups by name in one undo step; art using a deleted global swatch keeps its colour unlinked.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes

Parameters

Parameters of swatch.delete
NameTypeRequiredDescription
nameany[]no[swatch or colour group names] (a group goes with its swatches); a group goes with its swatches; one of several alternative parameters
namesany[]no[swatch or colour group names] (a group goes with its swatches); a group goes with its swatches; one of several alternative parameters
unlinkbooleannoart using a deleted global swatch keeps its colour, unlinked; false keeps the stale link

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "swatch.delete" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: name, names, unlink. 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": {
    "name": {
      "description": "[swatch or colour group names] (a group goes with its swatches); a group goes with its swatches; one of several alternative parameters",
      "items": {},
      "type": "array",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch",
        "SwatchGroup"
      ]
    },
    "names": {
      "description": "[swatch or colour group names] (a group goes with its swatches); a group goes with its swatches; one of several alternative parameters",
      "items": {},
      "type": "array",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch",
        "SwatchGroup"
      ]
    },
    "unlink": {
      "default": true,
      "description": "art using a deleted global swatch keeps its colour, unlinked; false keeps the stale link",
      "type": "boolean"
    }
  },
  "returns": "{deleted, unlinked: paints unlinked}",
  "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.