create_color_variable
Create or update a Figma color variable with RGB and alpha values. If the variable exists, its value updates for the default mode.
Instructions
Create or update a single Figma color variable. If the variable exists, its value for the default mode is updated.
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": {
"name": "<name>",
"r": "<r>",
"g": "<g>",
"b": "<b>"
},
"name": "create_color_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | Alpha/opacity (0-1, default: 1) | |
| b | Yes | Blue component (0-1) | |
| g | Yes | Green component (0-1) | |
| r | Yes | Red component (0-1) | |
| name | Yes | Name of the color variable. Use '/' for grouping, e.g., 'primary/50' | |
| collectionName | No | The name of the variable collection to use or create. Default: 'TalkToFigmaMCP Variables' |