replace_color
Replaces all pixels matching a source color within a 0-255 RGB tolerance with a target color on the active cel, preserving alpha in one undo step; supports headless files.
Instructions
Replace every pixel matching from_color (within tolerance, a 0-255
RGB distance) with to_color across the active cel, preserving each pixel's
alpha unless to_color carries its own. One undo step. Headless: pass file.
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 |
|---|---|---|---|
| file | No | ||
| to_color | Yes | ||
| tolerance | No | ||
| from_color | Yes |