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)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| layer_name | Yes | ||
| frame_index | Yes | ||
| from_color | Yes | ||
| to_color | Yes | ||
| tolerance | No |