Fill
fillApply a paint-bucket flood at x,y by color similarity, or cover a selection or whole layer with a color, gradient, or pattern while respecting active selections.
Instructions
Paint-bucket flood fill at (x,y) (mode "flood", region found by color similarity on the composite or the layer), or fill the whole selection/layer (mode "all") with a color, gradient or pattern. Respects the selection.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| mode | No | flood (needs x,y) or all (selection or whole layer). Default: flood if x given | |
| blend | No | ||
| color | No | CSS color string, or gradient/pattern object {type:"linear", from:[x,y], to:[x,y], stops:[...]} | {type:"radial", cx, cy, r, stops} | {type:"conic", cx, cy, angle, stops} | {type:"pattern", pattern:"hatch", color, spacing, angle}. Coordinates are canvas px. | |
| layer | No | Layer id, name, or index (0 = bottom, -1 = top). Default: the active layer. | |
| paint | No | Alias of color | |
| expand | No | Grow the flood region by px (default 1, tucks under line art) | |
| sample | No | Detect the region on the visible composite (default) or this layer only | |
| target | No | ||
| opacity | No | ||
| antialias | No | Soften flood edges (default true) | |
| tolerance | No | Flood color tolerance 0..255 (default 32) | |
| contiguous | No | false = all similar pixels anywhere |