extract_palette
Pull the colour palette out of an image, like the Palette Extractor on voidless.dev/tools. Up to max_colors every exact colour is listed with its pixel count; over it the colours are reduced to max_colors in OKLab (median cut refined by k-means), by default snapped to colours the image really has. Sorted by hue (greys first, then hue families dark to light), luminance or frequency. Returns the swatch PNG and, as text, the palette in GIMP .gpl (Aseprite, GIMP, Krita), .hex (Lospec), JSON with counts, and Adobe Swatch Exchange .ase as base64 (decode it to a binary .ase file). 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": "extract_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Palette name in the .gpl and JSON | Palette |
| 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 | |
| sort | No | hue | |
| 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. | |
| method | No | How to reduce when the image has more colours than max_colors | k-means |
| columns | No | Swatch PNG: colours per row (default all in one row up to 16) | |
| from_image | No | Reduced palettes: use only colours the image has (false = cluster averages) | |
| max_colors | No | The cap: list exact colours up to this, else reduce to it | |
| swatch_size | No | Swatch PNG: px per colour (1 = the Lospec 1x strip) |