replace_color
Replace all pixels of a given palette index with another palette index on a layer, optionally restricted to a specific region.
Instructions
Replace every pixel of one palette index with another on a layer (palette untouched). Optionally restricted to a region.
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": {
"doc_id": "<doc_id>",
"from_index": "<from_index>",
"to_index": "<to_index>"
},
"name": "replace_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | Frame index, 0-based (default: active frame) | |
| layer | No | Layer id or name (default: active layer) | |
| doc_id | Yes | Document id | |
| region | No | Region: exactly one of 'rect', 'pixels', or 'selection' | |
| render | No | Include a render of the change (default true) | |
| to_index | Yes | ||
| from_index | Yes | Palette index |