swatches
Manage active-document color presets: add, update, import, recolor, convert, and clean up global, spot, process, and gradient colors for consistent print production.
Instructions
Swatches of the active document. kind: "global" (global process — edit once, every use updates; default for add) | "spot" | "process" (plain) | "gradient". action: "list" (kind, group filters) · "add" (name, color; updates the swatch if it exists, so batches can be re-run; gradient: type linear|radial, stops [{color, at 0-100, opacity, midpoint}]; group) · "update" (name → color / stops / new_name / group) · "remove" (name or names) · "clean_defaults" (remove the default process swatches, unused default gradients/patterns and empty groups; keeps [None], [Registration], global and spot swatches and "keep" names) · "import" (path: an .ase swatch library; kind and group override the file's) · "recolor" (refs? default all: every fill, stroke, text run and gradient stop → the nearest of to [swatch names, "group:Name"; default all global/spot] within tolerance (ΔE, default 20), or map {"cmyk(…)": "swatch:X"}; tints stay tints; dry_run → report only) → {colors [{from, to, de, uses}], unmatched} · "convert" (mode cmyk|rgb|gray through the colour profiles; refs, default all — then cmyk/rgb also switch the document mode). Use them as colours: "swatch:Name", "swatch:Name@50" (tint), "gradient:Name@45" (angle).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "swatches"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| map | No | ||
| keep | No | ||
| kind | No | ||
| mode | No | ||
| name | No | ||
| path | No | ||
| refs | No | ||
| type | No | ||
| color | No | ||
| group | No | ||
| limit | No | ||
| names | No | ||
| stops | No | ||
| action | No | ||
| dry_run | No | ||
| new_name | No | ||
| tolerance | No |