reduce_colors
Quantize multiple images onto one shared palette so animation frames or directional sprites stay color-consistent. Choose auto, exact count, or reuse an existing palette; optional ordered dithering.
Instructions
Quantize one or more images onto a smaller SHARED palette, optionally with ordered dithering. Pass an animation's frames or a character's eight directions in one call so they come back sharing one palette instead of drifting apart. Choose the palette by omitting both options (auto-detect size), num_colors (exact count), or palette_image (reuse an existing image's colors, max 256). Total pixel budget across all frames is 512x512 (e.g. sixteen 64x64 frames).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| images | Yes | Image(s) to quantize together. All must be the same size | |
| dithering | No | Ordered dithering matrix size (default 'none'). Larger = smoother gradients, busier look | |
| num_colors | No | Target number of colors. Omit to auto-detect. Mutually exclusive with palette_image | |
| palette_image | No | Image whose colors become the palette (max 256 colors). Mutually exclusive with num_colors | |
| dithering_strength | No | How strongly to dither (0-10, default 5). Ignored when dithering is 'none' |