set_color_mode
Converts a sprite to RGB, grayscale, or indexed color mode, mapping missing palette colors to nearest entries and reporting dropped palette entries when needed.
Instructions
Convert the sprite to rgb, grayscale or indexed.
Indexed uses the sprite's current palette without dithering; colours missing from the palette map to the nearest entry. Index 0 becomes the transparent colour: when the palette is full, its least used entry is dropped to make room and reported in dropped_palette_entries.
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>",
"mode": "<mode>"
},
"name": "set_color_mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Colour mode | |
| path | Yes | Sprite file. Relative paths resolve against the server root. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||