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.
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) |