Create a theme variant (e.g. dark mode)
figma_create_theme_variantClone Figma layers or screens as another theme by switching collection modes or rebinding color variables to a second collection; reports unbound colors so you can fix them.
Instructions
Clones layers (usually screens) as another theme. With mode, the clone switches the collection to that mode (paid plans with several modes). With to_collection, every color bound to from_collection is rebound to the same-named variable in to_collection (works on plans limited to one mode: keep a second collection such as "Tokens Dark" with identical names). Reports colors that were not bound to tokens, which will not change; run figma_bind_tokens on the source first. Clones inside auto layout flow after the original; a containing section grows to fit.
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": {
"node_ids": "<node_ids>",
"from_collection": "<from_collection>"
},
"name": "figma_create_theme_variant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | No | Horizontal offset of each clone (default 0) | |
| dy | No | Vertical offset of each clone (default: height + 200) | |
| url | No | Figma link (or file key) of the file to edit. Needed only when the plugin is open in more than one file. | |
| mode | No | Mode of from_collection to switch the clones to | |
| suffix | No | Appended to clone names (default " (<mode or collection>)") | |
| node_ids | Yes | ||
| shadow_alpha | No | Multiply drop-shadow opacity (and make shadows black), e.g. 3 for dark themes | |
| to_collection | No | Collection with the same variable names holding the variant values | |
| from_collection | Yes | Collection the source layers are bound to |