set_fill
Apply fill or background color to Figma nodes using hex, gradients, custom tokens, or batch updates.
Instructions
Set fill or background color on a node.
set_fill({node: "1:2", bg: "#F5F5F5"}) set_fill({node: "1:2", fill: "#333333"}) set_fill({node: "1:2", bg: "linear-gradient(135deg, #8B5CF6 0%, #F97316 100%)"})
// Batch — bulk paint update in one call: set_fill({nodes: [{node: "1:2", bg: "#FFF"}, {node: "1:3", bg: "#F5F5F5"}]})
fill = text color or shape fill. bg = frame background. For stroke color, use set_stroke.
Accepted color formats (for fill or bg): hex "#FFF", "#F5F5F5" gradient string CSS-like subset, not full CSS: "linear-gradient(deg, <#hex> %, ...)" "linear-gradient(to , ...)" directions: top/right/bottom/left + corners "radial-gradient()" centered, no position/shape modifiers "radial-gradient(circle, )" circle shape only "conic-gradient(from deg, ...)" Rejected: "circle at X% Y%", "ellipse at ...", named colors, hsl(). variable token qualified bare name "$Surface/Card" transparent "transparent" (bg only)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | Node ID (single mode) | |
| fill | No | Text color or shape fill — hex, gradient string, or qualified bare-name token | |
| bg | No | Background — hex, gradient string, "transparent", or qualified bare-name token | |
| nodes | No | Batch: [{node, fill?, bg?}] |