Skip to content
ColorArchive
Issue 117
2028-03-25

Color token naming in design systems: semantic, literal, and the tier model

The names you give color tokens determine how easily a design system scales and how safely its colors can be changed. A design system with tokens named after their visual appearance (--color-blue-500) works until the brand's primary color changes from blue to teal, requiring updates across hundreds of callsites. A system with semantically named tokens (--color-action-primary) allows the underlying value to change without renaming anything. The tier model — values, decisions, and components — provides a systematic framework for naming that serves both needs.

Highlights
Literal color tokens (--blue-600, --gray-200) are named after the color's visual properties: its hue, family, and numeric position in a scale. They are easy to understand and easy to populate — you build the scale, number it, and name each step. The limitation appears when the literal color is used across many different semantic contexts: --blue-600 is the action color for buttons, the link color, the active nav indicator, and the selected state border. If your brand's action color changes from blue to green, you must find every callsite of --blue-600 and decide whether each one should update. Literal tokens are a good foundation layer; they are a poor interface layer for component-level consumption.
Semantic color tokens are named for the purpose or role they serve, not the color they currently represent. --color-action-primary, --color-text-body, --color-surface-elevated, --color-border-interactive are all semantic names. A component that uses --color-action-primary will automatically update if the design team decides to change the action color from blue to teal — only one token value changes, and every consumer updates without code changes. The limitation: semantic naming requires you to accurately predict every distinct use case at the time the system is designed. Systems that under-invest in semantic granularity end up with too few semantic tokens (--color-primary used for 15 different things) that lose their semantic meaning; systems that over-invest create hundreds of tokens with so much specificity that maintaining them becomes impractical.
The W3C Design Tokens Community Group tier model provides a practical architecture for reconciling literal and semantic naming. Tier 1 (Global tokens): The complete value palette. All possible colors in the system named literally — --global-blue-600, --global-green-400. Tier 2 (Alias tokens): Semantic assignments from the global palette — --color-action-primary: {global.blue-600}. Tier 3 (Component tokens): Component-specific overrides that reference alias tokens — --button-background-default: {color.action.primary}. This structure gives you literal names for the value inventory, semantic names for the decision layer, and component-specific names for any component that needs customization. Most systems can operate with Tiers 1 and 2; Tier 3 is valuable for design systems that must support theming at the component level.

Designing a semantic token vocabulary

A minimal semantic color token vocabulary for a product design system: (1) Surface tokens — background colors for page, card, elevated, and overlay surfaces (--surface-page, --surface-raised, --surface-overlay). (2) Text tokens — foreground colors for primary text, secondary text, disabled text, inverse text, and link text. (3) Border tokens — border colors for default, hover, focus, and error states. (4) Action tokens — colors for interactive elements across states: default, hover, pressed, disabled. Covers background, foreground, and border. (5) Status tokens — semantic colors for error, warning, success, and info states. Covers background tint, text, and border for each status. (6) Brand tokens — colors for any brand-specific uses that do not fit action or status roles: highlight accents, marketing callouts, illustration palette. This vocabulary of 25-40 semantic tokens is sufficient for most product interfaces; more granularity is needed only when building highly customizable component libraries.

Naming conventions that scale across dark and light mode

Naming tokens in a multi-theme system introduces a specific challenge: semantic names should not encode the current value's visual appearance, because the value changes by theme. A token named --text-dark-primary breaks in dark mode (the primary text is now light, not dark). The correct approach: name tokens by semantic role and let the theme override the value. --text-primary is the primary text color in every theme; its value is near-black in light mode and near-white in dark mode. The naming pattern should be noun (what the token applies to) + modifier (which variant or state). Avoid encoding visual properties (dark, light, warm, cool) in semantic token names at the tier-2 level. The exception: tier-1 global tokens should and must encode visual properties, since their purpose is to describe the full value inventory precisely.

Managing token evolution over time

Design system tokens evolve: brands rebrand, products enter dark mode, components get added. A naming convention that does not anticipate evolution creates migration problems. Best practices for sustainable token naming: (1) Use a namespace prefix for all system tokens (--ds-, --brand-, or the product name) to prevent collision with third-party CSS. (2) Avoid version numbers in token names (--color-v2-action-primary) — versioning belongs in documentation, not names. (3) Keep a token changelog as part of design system release notes, documenting added, renamed, deprecated, and removed tokens. (4) Use a deprecation pattern: before removing a token, add the old name as an alias pointing to the new name for at least one major version, with a documentation notice. (5) Consider an automated linting pass that warns when deprecated tokens are used in component code. Each of these practices reduces the migration cost when the system necessarily changes.

Translating color tokens into CSS, Figma, and JSON

Design tokens exist simultaneously in multiple environments: CSS custom properties for web, Figma variables for design tools, and JSON for toolchain portability. The naming translation across formats is non-trivial. CSS custom properties use kebab-case with double-dash prefix: --color-action-primary. Figma variables use a path/group structure: Color/Action/Primary (the slash is the Figma group separator). JSON uses dot-notation or nested objects: color.action.primary. The W3C Design Tokens format specifies a JSON schema that can be compiled to all three formats by tools like Style Dictionary and Theo. If you are building a token system that needs to work across design and development environments, adopting the W3C format early — or using a token management tool (Tokens Studio for Figma, Supernova, Specify) that handles the translation — prevents the divergence that happens when designers maintain one set of names and engineers maintain a different set.

Newer issue
Color in packaging design: shelf presence, SKU differentiation, and print production
2028-03-18
Older issue
Color temperature in UI design: building warm and cool systems that actually feel intentional
2028-04-01