Set Fill
node_set_fillSet a Figma node's fill to a literal RGBA color, an image, or clear it. Accepts color components, image URL or base64 bytes, and a clear flag.
Instructions
Set a node's fill to a literal RGBA color, an image, or clear it. Use node_apply_style to link a shared paint style, or node_bind_variable to bind a color token.
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>",
"nodeName": "<nodeName>"
},
"name": "node_set_fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | Alpha component (0-1) | |
| b | No | Blue component (0-1) | |
| g | No | Green component (0-1) | |
| r | No | Red component (0-1) | |
| clear | No | Set to true to clear all fills. Must provide exactly one of solid color, image, or clear:true. | |
| image | No | Optional image payload. Must provide exactly one of solid color or image. | |
| nodeId | Yes | The ID of the node to modify | |
| nodeName | Yes | The node's current exact name, passed back verbatim from `node_info`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the modified node | |
| error | No | ||
| warnings | No | Warnings from the operation (e.g., resizing) |