get_color_stats
Analyze a sprite frame to list ranked RGBA color frequencies, counts, and percentage coverage, treating fully transparent pixels separately.
Instructions
The most used colours of the visible composite of one frame.
Colours are told apart by their full RGBA, so the same RGB at another alpha is a separate entry. Fully transparent pixels are only counted in transparent; unique and percent cover the other pixels; percent has 4 decimals. Ties are ordered by red, green, blue, then alpha. A frame with more than 1048576 different colours is refused (use extract_palette for such images).
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": "get_color_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Most colours to list | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| frame | No | 1-based frame number |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||