replace_color
Recolor pixels by swapping one color for another on a layer or all layers across frames, with optional RGB tolerance.
Instructions
Replaces one color with another on a layer (or all layers) across frames, with optional per-channel tolerance (RGB).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| tag | No | Use the frames of this tag | |
| from | Yes | '#rrggbb', '#rrggbbaa', a name, a palette index, or {r,g,b,a} / {h,s,v,a} / {h,s,l,a} / {gray,a} | |
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| frame | No | 1-based frame number. Defaults to the active frame (or 1). | |
| layer | No | Layer name, 'Group/Child' path, or 1-based index from get_sprite_info. Defaults to the active layer. | |
| frames | No | 'all' or a list of frame numbers | |
| sprite | No | File path, open tab title, or sprite id. Defaults to the active sprite (live). Batch mode needs a file path. | |
| backend | No | auto (default): live Aseprite if connected, else headless batch | |
| tolerance | No |