palette_from_image
Extracts a color palette from a reference image and optionally applies it to an Aseprite file, helping match sprite colors to concept art, photos, or screenshots.
Instructions
Extract a palette from a reference image (concept art, photo, screenshot).
Perceptual k-means in OKLab, weighted by how much of the image each colour covers, then sorted into hue families dark to light.
Args: image_path: PNG/JPG/GIF to read colors: How many colours, 2-64 apply_to: Aseprite file whose palette to set ignore_transparent: Skip transparent pixels output_filename: Optional swatch PNG
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_path": "<image_path>"
},
"name": "palette_from_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| colors | No | ||
| apply_to | No | ||
| image_path | Yes | ||
| output_filename | No | ||
| ignore_transparent | No |