set_gradient_fill
Apply a linear, radial, angular, or diamond gradient fill to a Figma node by specifying color stops and optional transform points, opacity, and paint index.
Instructions
Set a gradient fill (LINEAR, RADIAL, ANGULAR, DIAMOND) on a node. stops: [{position 0..1, color {r,g,b[,a]}}]. Optional from/to transform points (normalized), opacity, paintIndex.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nodeId": "<nodeId>",
"stops": "<stops>"
},
"name": "set_gradient_fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| stops | Yes | ||
| nodeId | Yes | ||
| opacity | No | ||
| paintIndex | No | ||
| gradientType | No |