fill_area
Flood-fills the matching-color area around a seed pixel on a sprite layer, applying an exact RGBA color with tolerance and contiguous options.
Instructions
Flood-fill the area around (x, y) whose colour matches the seed pixel's.
Neighbours are the 4 pixels left, right, above and below. Only the layer itself is looked at (not the composited image); outside its cel the layer counts as transparent, so filling an empty area covers it up to the canvas edges. The seed must be on the canvas. Pixels get exactly the colour, without blending.
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>",
"x": "<x>",
"y": "<y>",
"color": "<color>"
},
"name": "fill_area"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Seed pixel x | |
| y | Yes | Seed pixel y | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| color | Yes | '#RRGGBB', '#RRGGBBAA' or 'transparent' | |
| frame | No | 1-based frame number | |
| layer | No | Layer name or 'group/child' path; empty = the bottom-most normal layer | |
| tolerance | No | Largest per-channel RGBA difference that matches | |
| contiguous | No | false: replace every matching pixel of the layer's canvas | |
| create_cel | No | Add an empty cel when the layer has none in that frame |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||