fill_gradient
Fill a canvas region with a linear or radial gradient, applying multiple color stops and optional dithering for retro pixel art.
Instructions
Fill a region with a gradient.
Args:
colors: 2+ colour stops, e.g. ["#000000", "#ff004d", "#ffec27"], spread
evenly. For dither=True, provide exactly 2 colours.
gradient_type: "linear" or "radial".
angle: Direction in degrees for linear gradients (0 = left->right).
dither: Ordered (Bayer 4x4) dithering between 2 colours instead of smooth
interpolation — great for limited palettes / retro looks.
x, y, width, height: Region (defaults to the whole canvas).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| angle | No | ||
| frame | No | ||
| layer | No | ||
| width | No | ||
| colors | Yes | ||
| dither | No | ||
| height | No | ||
| filename | Yes | ||
| gradient_type | No | linear |