Generate Theme Config
generate_theme_configGenerate theme-aware CSS, Tailwind, or TypeScript ThemeProvider files from Figma Variable modes to keep Light/Dark themes consistent across design and code.
Instructions
Extract multi-theme configurations from Figma Variable modes.
Generates theme-aware output files (CSS custom properties with theme selectors, Tailwind config, or TypeScript ThemeProvider) from Figma Variable modes (Light/Dark/etc).
Args:
figma_file_key (string): The Figma file key
output_format ('css' | 'tailwind' | 'theme-provider' | 'all'): Output format (default: 'css')
color_scheme_strategy ('data-attribute' | 'media-query' | 'class'): CSS selector strategy (default: 'data-attribute')
default_mode (string, optional): Override base theme mode name
Returns: JSON with generated file(s) and summary of modes/token counts.
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": {
"figma_file_key": "<figma_file_key>"
},
"name": "generate_theme_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| default_mode | No | Override which mode is the base theme (auto-detects if omitted) | |
| output_format | No | Output format (default: 'css') | css |
| figma_file_key | Yes | The Figma file key (from the URL: figma.com/design/{THIS_PART}/...) | |
| color_scheme_strategy | No | CSS selector strategy for themes (CSS format only, default: 'data-attribute') | data-attribute |