quantize_pro
Snap pixel art to a chosen or generated palette using perceptual OKLab matching and optional ordered or error-diffusion dithering for clean sprites and gradients.
Instructions
Snap art onto a palette, perceptually, with optional dithering.
Nearest colour is chosen in OKLab (what looks closest, not what is numerically closest in RGB), so skin stays skin and shadows don't turn green. Dithering options for gradients and painted sources: none - clean flat colours (best for sprites) bayer2 / bayer4 / bayer8 - ordered patterns, the retro look, stable in animation floyd / atkinson - error diffusion, for converting painted or photo material (atkinson keeps more contrast); avoid on animation
The palette comes from palette, the sprite's own palette, a preset
(gameboy, pico8, c64, cga, dawnbringer16, dawnbringer32, ...), or is
built from the art itself with max_colors.
Args: filename: Aseprite file palette: Hex colours to snap to use_sprite_palette: Use the sprite's current palette preset: Name of a built-in palette preset max_colors: Build an optimal palette of this many colours from the art dither: none, bayer2, bayer4, bayer8, floyd, atkinson strength: Dither amount 0-1 layer_name: "*" = every image layer, or one layer frames: "" = every frame
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "quantize_pro"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dither | No | none | |
| frames | No | ||
| preset | No | ||
| palette | No | ||
| filename | Yes | ||
| strength | No | ||
| layer_name | No | * | |
| max_colors | No | ||
| use_sprite_palette | No |