Figma Integration
The Axiomatic Color is designed to be the “Source of Truth” for your color palette. However, we know that design happens in tools like Figma. This guide explains how to bridge the gap.
The Workflow
Section titled “The Workflow”- Configure & Solve: Use the Theme Builder or edit
color-config.jsonto define your system. - Export: Run the CLI to generate a W3C Design Tokens (DTCG) file.
- Import: Load the tokens into Figma using a plugin like Tokens Studio.
Exporting Tokens
Section titled “Exporting Tokens”To generate a DTCG-compatible JSON file, use the export command:
pnpm axiomatic export --format dtcg > tokens.jsonThis will output a JSON file containing your entire theme (Light and Dark modes) in the standard format.
Importing into Figma
Section titled “Importing into Figma”Using Tokens Studio (Recommended)
Section titled “Using Tokens Studio (Recommended)”Tokens Studio for Figma is the industry standard for managing design tokens in Figma. It fully supports the W3C format.
- Open the Tokens Studio plugin in Figma.
- Go to the Tools tab (or Settings).
- Click Load from file/folder or Import.
- Select your generated
tokens.json. - The plugin will create token sets for
lightanddark.
Using Native Figma Variables
Section titled “Using Native Figma Variables”Native Figma Variables are powerful but have a stricter structure. Currently, the best way to import DTCG tokens into native variables is via a plugin that handles the conversion, or by using Tokens Studio’s “Create Variables” feature.
- Import tokens into Tokens Studio (as above).
- Click Create Variables in the plugin.
- Map the
lightanddarksets to a Figma Mode (e.g., “Color Mode”).
Token Structure
Section titled “Token Structure”The exported tokens follow this structure:
- Surfaces:
light.surface.brand,dark.surface.brand - Foregrounds:
light.on-surface.brand.high,dark.on-surface.brand.high
This structure ensures that you can bind your Figma layers to semantic tokens (like “Brand Surface”) rather than raw hex values.