replace_color
Replace a specified color with another color in a sprite cel, maintaining alpha transparency. Use with tolerance for similar colors.
Instructions
Replace one color with another in a cel, preserving alpha.
Args: filename: Aseprite file to modify layer_name: Layer to operate on frame_index: Frame index starting at 1 from_color: Hex color to replace, e.g. "#FF0000" to_color: Replacement hex color tolerance: Per-channel tolerance 0-255 (default 0 = exact match)
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": {
"filename": "<filename>",
"layer_name": "<layer_name>",
"frame_index": "<frame_index>",
"from_color": "<from_color>",
"to_color": "<to_color>"
},
"name": "replace_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| layer_name | Yes | ||
| frame_index | Yes | ||
| from_color | Yes | ||
| to_color | Yes | ||
| tolerance | No |