set_palette
Replace a sprite's palette using hex colors or a palette file, and optionally convert to indexed mode so every pixel snaps to the nearest palette color.
Instructions
Replace the palette from a list of hex colors or a palette file (.gpl, .pal, .png, .aseprite). With to_indexed=True the sprite is converted to indexed mode and every pixel snaps to its nearest palette color.
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": "set_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| colors | No | ||
| dithering | No | none | |
| to_indexed | No | ||
| palette_file | No |