---
title: "swatch.edit: Swatch Options — Vector kit command — Kition"
description: "Changes a swatch: its name, colour or colour mode, global and spot flags, or replaces its paint; linked art updates."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/swatch.edit"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/swatch.edit](https://developer.kition.ai/docs/kits/vector/commands/swatch.edit)

# swatch.edit

**Swatch Options.** Changes a swatch: its name, colour or colour mode, global and spot flags, or replaces its paint; linked art updates.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | `string` | no | e.g. {l, a, b} for a Lab colour |
| `global` | `boolean` | no |  |
| `ids` | `any[]` | no | read by the command beside its listed parameters |
| `mode` | `"gray" \| "rgb" \| "hsb" \| "lab" \| "cmyk" \| "web"` | no | convert the colour |
| `name` | `string` | no |  |
| `newName` | `string` | no |  |
| `paint` | `object` | no |  |
| `spot` | `boolean` | no |  |

## Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `color`, `global`, `ids`, `mode`, `name`, `newName`, `paint`, `spot`. 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": {
    "color": {
      "description": "e.g. {l, a, b} for a Lab colour",
      "type": "string"
    },
    "global": {
      "type": "boolean"
    },
    "ids": {
      "description": "read by the command beside its listed parameters",
      "type": "array"
    },
    "mode": {
      "description": "convert the colour",
      "enum": [
        "gray",
        "rgb",
        "hsb",
        "lab",
        "cmyk",
        "web"
      ],
      "type": "string"
    },
    "name": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    },
    "newName": {
      "type": "string"
    },
    "paint": {
      "additionalProperties": true,
      "type": "object"
    },
    "spot": {
      "type": "boolean"
    }
  },
  "returns": "{name, relinked: paints changed}",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
