replace_color
Replace all occurrences of a specific color with another in a sprite. Specify source and target colors, optionally filter by layer or frame, and set tolerance.
Instructions
Replace all occurrences of one color with another in a sprite
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Sprite file | |
| fromColor | Yes | Source color to replace (hex, palette index, or {r,g,b,a}) | |
| toColor | Yes | Replacement color (hex, palette index, or {r,g,b,a}) | |
| layerName | No | Only replace on this layer (optional, all layers if omitted) | |
| frameNumber | No | Only replace on this frame (optional, all frames if omitted) | |
| tolerance | No | Color matching tolerance (0-255, default: 0) | |
| savePath | No | Path to save |