Paint: Bucket fill / recolour
paint_fillFlood-fills a canvas region with a specified color, using tolerance and contiguous settings to control which matching pixels are affected. Targets a named canvas or layer.
Instructions
Paint bucket. tolerance is summed channel distance (0 = exact, 60 ≈ shades of the same hue). contiguous:false hits every matching pixel of the layer; mode:'replace' swaps the colour instead of painting over it.
Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| mode | No | over | |
| blend | No | Blend mode for this stroke | normal |
| color | Yes | ||
| layer | No | Target layer index; defaults to the active layer (see paint_canvas). | |
| canvas | Yes | Canvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted. | |
| opacity | No | 0..1 strength of this stroke | |
| preview | No | Image reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only | |
| tolerance | No | ||
| contiguous | No | ||
| preview_size | No | Longest edge of the returned thumbnail |