extract_palette
Extract up to a set number of representative colors from a sprite's visible layers and frames using Aseprite quantization, without altering the sprite or its palette. Use the result with set_palette.
Instructions
Find up to max_colors colours that best represent the visible sprite.
Uses Aseprite's colour quantization over all visible layers and frames. Its palettes hold a transparent entry, which is left out of the result but takes one of the 256 slots, so max_colors=256 gives at most 255 colours. The sprite and its palette are not changed: pass the result to set_palette to use it.
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": {
"path": "<path>"
},
"name": "extract_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| max_colors | No | Most colours to return, counting a transparent slot | |
| with_alpha | No | Keep semi-transparent colours apart instead of opaque |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||