set_palette
Change a sprite's palette by setting colors, resizing, replacing, loading from .gpl/.pal/.act/.ase/.png files or built-in presets, or generating from the sprite's colors.
Instructions
Changes the palette: set colors starting at 'start', replace it entirely, resize, load from a file (.gpl, .pal, .act, .ase, .png...) or a built-in preset (e.g. DB16, DB32, PICO-8...), or generate it from the sprite's colors (fromSprite).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| save | No | Batch mode: write changes back to the sprite file (default true) | |
| size | No | ||
| start | No | ||
| colors | No | ||
| preset | No | ||
| 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 | |
| replace | No | Palette becomes exactly 'colors' | |
| algorithm | No | ||
| maxColors | No | ||
| withAlpha | No | ||
| fromSprite | No | Build a palette from the sprite (ColorQuantization) |