Generate color token annotations showing design token mappings for every element and state directly in Figma. Use when you need to document color usage across component states and themes.
Generate a color annotation specification that maps every UI element to its design token across all states and theme modes.
@create-color https://www.figma.com/design/FILE_KEY/Design-System?node-id=123:456
Button component with states:
- Default (enabled)
- Hover
- Pressed
- Disabled
Has light and dark mode variants.
A detailed color spec page in Figma containing:
State Matrix
Token Mapping Table
| Element | Default | Hover | Pressed | Disabled |
|---|
| Background | primary-500 | primary-600 | primary-700 | neutral-200 |
| Text | white | white | white | neutral-400 |
| Border | transparent | transparent | transparent | neutral-300 |
Mode Variants (if applicable)
┌─────────────────────────────────────────────────────────────────┐
│ BUTTON COLOR SPECIFICATION │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─ STATE MATRIX ──────────────────────────────────────────┐ │
│ │ │ │
│ │ Default Hover Pressed Disabled │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ primary │ │ primary │ │ primary │ │ neutral │ │ │
│ │ │ -500 │ │ -600 │ │ -700 │ │ -200 │ │ │
│ │ │[Button] │ │[Button] │ │[Button] │ │[Button] │ │ │
│ │ │ white │ │ white │ │ white │ │ neutral │ │ │
│ │ │ │ │ │ │ │ │ -400 │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌─ TOKEN TABLE ───────────────────────────────────────────┐ │
│ │ Element │ Default │ Hover │ Disabled │ │
│ │────────────┼──────────────┼──────────────┼──────────────│ │
│ │ Background │ primary-500 │ primary-600 │ neutral-200 │ │
│ │ Label │ white │ white │ neutral-400 │ │
│ │ Icon │ white │ white │ neutral-400 │ │
│ │ Border │ transparent │ transparent │ neutral-300 │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌─ THEME MODES ───────────────────────────────────────────┐ │
│ │ │ │
│ │ LIGHT MODE DARK MODE │ │
│ │ ┌───────────────────┐ ┌───────────────────┐ │ │
│ │ │ [Default Button] │ │ [Default Button] │ │ │
│ │ │ primary-500 │ │ primary-400 │ │ │
│ │ └───────────────────┘ └───────────────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Extract tokens → Enable hidden toggles → Classify axes → Detect modes → Choose strategy → Render → Validate
Using Figma MCP:
Some color bindings only appear when optional elements are visible:
Determine which variant axes affect color:
Identify variable mode collections that affect color:
Strategy A: Sections per variant (≤6 sections)
Strategy B: States as columns (>6 sections)
Each annotation uses a token tag:
┌──────────────────┐
│ ● primary-500 │ ← Color swatch + token name
└──────────────────┘
Button with themes:
@create-color https://figma.com/.../Button
States: default, hover, pressed, disabled
Variants: primary, secondary, tertiary
Modes: light, dark
Input field:
@create-color https://figma.com/.../TextField
States: empty, filled, focused, error, disabled
Elements: background, border, label, input text, helper text
Complex card:
@create-color https://figma.com/.../Card
This card has:
- Header with title and subtitle
- Content area
- Footer with actions
- Selection state (highlighted border)
- Hover state (subtle shadow change)
Focus on specific elements:
Only document the background and text colors, skip borders
Specific states:
Focus on error states across all input components
Include opacity:
Include opacity values where elements use transparency