Replace Color
replace_colorReplace colors across an entire document or within a specific layer by matching from_color and applying to_color, with tolerance and fill/stroke targeting. Note that from_color and to_color must share the same color type.
Instructions
Find and replace colors across the document or within a specific layer. Limitations: SpotColor and GrayColor matching not supported. Cross-colorspace matching (e.g. RGB→CMYK) not possible — from_color and to_color must use the same color type as the target objects.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from_color": "<from_color>",
"to_color": "<to_color>"
},
"name": "replace_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Layer name to limit replacement scope (default: entire document) | |
| target | No | Which color attributes to replace | both |
| to_color | Yes | Replacement color (required) | |
| tolerance | No | Color matching tolerance per channel (0 = exact match, 100 = match any) | |
| from_color | Yes | Color to find (required) |