reduce_colors
Reduce an image to N colours, like the Color Reducer on voidless.dev/tools. The palette is found in OKLab, a perceptual colour space (k-means seeded by median cut, or median cut alone), so the colours are spent where the eye sees a difference. Dithering is off by default (clean pixel art); ordered (Bayer 8x8) or Floyd-Steinberg are optional. Transparency is kept exactly. An image that already has N colours or fewer comes back unchanged. Returns the PNG with the before/after colour counts and the palette. Images up to 2048x2048, 256 frames, 32 MB of input per call. Free: no credits.
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": {
"image": "<image>"
},
"name": "reduce_colors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Also save the result to your Voidless library (free, private) and return its asset id and cdn.voidless.dev URL, for passing to the next tool without base64 | |
| image | Yes | An image: an https URL (e.g. a cdn.voidless.dev link from get_asset or a saved result), a library image key (assets/…png, as get_asset lists it), a data: URI, or base64 PNG/GIF. | |
| scale | No | Also return a copy scaled up this much (nearest neighbour) | |
| colors | No | ||
| dither | No | none | |
| method | No | k-means | |
| from_image | No | Use only colours the image already has (no averaged colours) | |
| dither_strength | No |