gradient_fill
Fill a layer or selection with a linear or radial color gradient by specifying start and end colors and coordinates.
Instructions
Fill a layer or selection with a gradient.
Parameters:
color1: Start color (default "black")
color2: End color (default "white")
x1, y1: Gradient start point (default top-left 0,0)
x2, y2: Gradient end point (defaults to bottom-right of image)
gradient_type: "linear" (default) or "radial"
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | No | ||
| x2 | No | ||
| y1 | No | ||
| y2 | No | ||
| color1 | No | black | |
| color2 | No | white | |
| layer_name | No | ||
| image_index | No | ||
| gradient_type | No | linear |