set_gradient
Apply a gradient fill to a Figma node, replacing all existing fills. Supports linear, radial, angular, and diamond gradients with customizable color stops and optional transform matrix.
Instructions
Set a gradient fill on a node in Figma. Supports linear, radial, angular, and diamond gradients. Replaces all existing fills (same behavior as set_fill_color).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node to modify | |
| type | Yes | Gradient type | |
| stops | Yes | Array of gradient color stops (minimum 2) | |
| gradientTransform | No | 2x3 affine transform matrix [[a,b,tx],[c,d,ty]]. Defaults to left-to-right linear: [[1,0,0],[0,1,0]] |