Palette
paletteRead, set, load, generate, analyze, or extract Aseprite sprite color schemes so you can choose colors before drawing and avoid repainting completed art.
Instructions
Read and shape the sprite's palette. Ops: • 'get' — current palette with per-colour usage counts. • 'set' — write specific indices, or replace the palette wholesale. • 'preset' — load a bundled palette by key: ~2000 of them, the classics (pico8, gameboy, cga, nes…) and the most-downloaded on Lospec (sweetie-16, endesga-32, resurrect-64, aap-64…). An unknown key or a name answers with the matching keys, so 'preset: "gameboy"' or 'preset: "endesga"' is a search. • 'load' — read a .gpl/.hex/.pal/.png palette file from disk. • 'ramp' — generate a hue-shifted ramp from a base colour and append it. Shadows rotate toward blue, highlights toward orange; a ramp that only changes brightness is the clearest tell of machine-made pixel art. • 'analyze' — report ramp structure, contrast, near-duplicate entries and colours used in the art that are not in the palette. • 'extract' — replace the palette with one quantized from the art itself (RGB sprites only). Use to derive a curated palette from a reference image imported at full colour. Decide the palette before drawing. Retro-fitting one onto finished art means repainting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| base | No | Base colour for op 'ramp'. | |
| path | No | Palette file for op 'load'. | |
| steps | No | Ramp length. | |
| colors | No | For op 'set': the colours to write. | |
| preset | No | Preset key for op 'preset'. | |
| spread | No | How far the ramp reaches into shadow and light. | |
| sprite | No | Which sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused. | |
| replace | No | For op 'set'/'preset': replace the whole palette instead of merging. | |
| remapArt | No | When replacing a palette, repaint existing pixels to the nearest new colour instead of leaving them off-palette. | |
| maxColors | No | For op 'extract': target palette size. | |
| startIndex | No | For op 'set': where `colors` starts. Ignored when `replace` is true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| path | No | Palette file read by op 'load'. | |
| ramp | No | ||
| size | No | ||
| total | No | Op 'preset' with no such key: presets bundled. | |
| usage | No | ||
| colors | No | ||
| sprite | No | ||
| matches | No | Op 'preset' with no such key: presets whose key, name, author or tags match it. | |
| analysis | No |