set_palette
Replace a sprite's palette using custom colours or a preset such as pico8 or gameboy. Indexed pixels keep their indices and display the new colours; transparent and RGB behaviour is preserved.
Instructions
Replace the palette with the given colours or a preset; pass exactly one of them.
Colours may carry alpha and may be 'transparent'. RGB pixels do not change. Indexed pixels keep their indices, so each shows the new colour at its entry; the palette must stay large enough for every index in use, and the transparent index stays the same. Grayscale sprites are refused: Aseprite always gives them the 256 grays, so convert to rgb or indexed with set_color_mode first.
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 | Sprite file. Relative paths resolve against the server root. | |
| colors | No | 1 to 256 colours | |
| preset | No | A preset palette, see aseprite://palettes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||