quantize_to_palette
Replaces each opaque pixel with the nearest palette color across selected layers or frames, so existing pixel art conforms to the current palette.
Instructions
Snap every pixel to the nearest color in the sprite's palette.
Walks the chosen cels and replaces each opaque pixel with the closest palette color (RGB distance). Run after apply_palette_preset or set_palette to make existing art conform to the palette.
Args: filename: Aseprite file to modify layer_name: Layer to quantize (empty = all top-level layers) start_frame: First frame to process (default 1) end_frame: Last frame to process (default 0 = last frame)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| end_frame | No | ||
| layer_name | No | ||
| start_frame | No |