Recolor
recolorChange pixel art colors in a region by intent: shade, snap to palette, replace, hue shift, or desaturate, while keeping results palette-legal in one pass.
Instructions
Change colours in a region by intent, staying palette-legal. Ops: • 'shade' — darken or lighten with proper hue shifting (shadows cool, highlights warm). Use this instead of picking a darker hex by hand. • 'snap' — pull off-palette pixels onto the nearest palette colour by perceptual (CIELAB) distance. • 'replace' — swap one exact colour for another. • 'hue_shift' — rotate hue, e.g. to make a colour variant of a finished sprite. • 'desaturate' — drop toward grey, useful for a value check. Operates on a region's distinct colours in one pass, so a 64×64 recolour is one undo step, not four thousand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| to | No | For 'replace'. | |
| from | No | For 'replace'. | |
| frame | No | 1-based frame number. Omit to use the active frame. | |
| layer | No | Layer name. Omit to use the active layer. | |
| amount | No | For 'shade': negative darkens, positive lightens. One ramp step is roughly 0.15. | |
| region | No | Omit to affect the whole cel. | |
| sprite | No | Sprite filename or id. Omit to use the sprite Aseprite has focused. | |
| degrees | No | For 'hue_shift'. | |
| strength | No | For 'desaturate'. | |
| selectionOnly | No | ||
| clampToPalette | No | Snap the result back onto the palette. Turn off only when growing the palette deliberately. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| sprite | Yes | ||
| mapping | Yes | Exactly which colour became which, and how many pixels each move touched. | |
| pixelsChanged | Yes |