flood_fill
Replaces a contiguous area of matching pixels on a canvas with a new color, starting from a specified coordinate. Useful for recoloring shapes and regions in pixel art.
Instructions
Fills a contiguous area of matching color starting at (x, y).
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": {
"canvas_id": "<canvas_id>",
"x": "<x>",
"y": "<y>",
"color": "<color>"
},
"name": "flood_fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Start X coordinate | |
| y | Yes | Start Y coordinate | |
| color | Yes | Fill color or palette index | |
| canvas_id | Yes | Target canvas ID |