A color token system has three tiers, and the distinction between tiers is the single most important concept in token architecture. Tier 1 (Primitive / Global tokens): the raw color values from your palette — `--color-blue-500: #3B82F6`. These tokens have no semantic meaning; they just name colors. They are never used directly in component code. Tier 2 (Semantic / Alias tokens): tokens that express intent rather than value — `--color-action-primary: var(--color-blue-500)`. These are the tokens components actually reference. Semantic tokens are what makes theming possible: to switch from blue to green primary, you change one semantic token, not hundreds of component-level hard-codes. Tier 3 (Component tokens, optional): component-specific tokens for large design systems — `--button-primary-background: var(--color-action-primary)`. Most projects do not need Tier 3 initially; add it when component-level overrides become necessary. The common mistake is to use only Tier 1 (raw hex) in components, which produces fragile systems that break on any rebrand.
Token naming is the decision with the longest-lasting consequences. Two naming philosophies exist: semantic naming (names express use) and descriptive naming (names express appearance). Semantic: `--color-text-primary`, `--color-surface-secondary`, `--color-feedback-error`. Descriptive: `--color-neutral-900`, `--color-brand-blue`, `--color-red-600`. Best practice: use descriptive naming at Tier 1 and semantic naming at Tier 2. Do NOT use color names that encode visual values into semantic positions (avoid `--color-primary-blue` because it breaks when the primary becomes green; prefer `--color-brand-primary` or `--color-action-interactive`). Do NOT name tokens for current values — `--color-dark-gray-text` creates problems when dark mode makes that 'dark gray' appear light. Name tokens for their role, not their current value.
Multi-theme token systems — supporting light mode, dark mode, and potentially brand variants — require that Tier 2 semantic tokens change their resolved Tier 1 value depending on the active theme, while component code remains unchanged. Implementation: define semantic tokens in a `:root` block for light mode, and override them in a `[data-theme='dark']` or `@media (prefers-color-scheme: dark)` block. Component code uses only semantic tokens — `background: var(--color-surface-primary)` — and automatically picks up the correct value for the active theme. The number of semantic tokens in a well-structured system is typically 30-60 for a complete product UI; a system with over 100 semantic tokens may have introduced unnecessary token proliferation.