Skip to content
All guides

Design tokens

Design tokens in Figma with light and dark modes

Build a small theme with primitive colors, semantic variables and aliases your team can hand off.

A primitive token names a reusable value, such as a palette color. A semantic token names the job that value does, such as the default text color. In Figma, the semantic Color variable can point to a primitive Color variable through an alias.

1. Create a primitive color collection

Create a local collection called Palette with one mode. Add these Color variables:

  • white · #FFFFFF
  • slate-50 · #F8FAFC
  • slate-900 · #0F172A
  • violet-700 · #6D28D9
  • violet-400 · #A78BFA

2. Give semantic colors a Light and Dark mode

Create a second collection called Theme. If your Figma plan supports multiple modes, name its modes Light and Dark. Add these three Color variables and set each mode’s value to the corresponding Palette variable.

Theme variableLight aliasDark alias
color/surface/defaultwhiteslate-900
color/text/defaultslate-900slate-50
color/action/primaryviolet-700violet-400

3. Check both modes on a frame

Create a small frame with a background, text and a button. Bind the background to color/surface/default, the text to color/text/default, and the button fill to color/action/primary. Switch the frame’s Theme mode and confirm that all three elements change together. Check the button label’s contrast separately in both modes.

4. Share a readable reference

Keep the semantic names and intended uses next to your design system. Follow the Figma variables documentation guide to generate a reference table on the canvas.

Try Variables Doc Designer in Figma

Figma’s references cover collections and aliases and setting and switching modes.