palette_swap
Recolour a sprite. swaps: from→to colour pairs; by default only pixels of those exact colours change (raise tolerance to catch near shades), match "nearest" snaps every pixel to its nearest from colour (the voidless.dev/tools palette swap). Or palette: a preset (1bit, gameboy, cga, gray4) or a list of hex colours to quantize to, with optional dithering. Call with neither to list the image's colours. 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": "palette_swap"
}
}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. | |
| match | No | exact | |
| swaps | No | ||
| dither | No | With palette or nearest: Floyd-Steinberg or ordered (Bayer) dithering | none |
| palette | No | ||
| tolerance | No | For exact: how far (|dr|+|dg|+|db|) a pixel may be from a from colour | |
| pixel_size | No | Chunky pixels: average blocks of this size first |