Skip to main content
Sets the fill color of a Figma node. Works with text nodes and frame nodes.

Parameters

nodeId
string
required
The ID of the node to modify
r
number
required
Red component (0-1 range)
g
number
required
Green component (0-1 range)
b
number
required
Blue component (0-1 range)
a
number
Alpha/transparency component (0-1 range). Defaults to 1 (fully opaque)
Figma uses RGBA values in the 0-1 range, not 0-255. For example, pure red is {r: 1, g: 0, b: 0}, not {r: 255, g: 0, b: 0}.

Response

Returns the name of the modified node and confirms the color change.

Examples

Set solid red fill

{
  "nodeId": "123:456",
  "r": 1,
  "g": 0,
  "b": 0,
  "a": 1
}

Set semi-transparent blue fill

{
  "nodeId": "123:456",
  "r": 0,
  "g": 0.5,
  "b": 1,
  "a": 0.7
}

Set white fill (default alpha)

{
  "nodeId": "123:456",
  "r": 1,
  "g": 1,
  "b": 1
}

Build docs developers (and LLMs) love