Free color tools · No signup · Everything runs in your browser
Web and UI

How to Build Color Design Tokens from One Brand Color

Turn one brand color into primitive, semantic, component, light-mode, dark-mode, and high-contrast color tokens without losing traceability.

Direct answer

Start with a perceptual primitive scale, preserve the canonical brand color as an explicit token, then map semantic roles such as canvas, text, border, action, focus, and status. Add component tokens only when a shared semantic role is not specific enough. Resolve every alias across light, dark, and high-contrast themes, then test the actual text, boundary, focus, and component-state combinations before export.

At a glance

ArchitecturePrimitive → semantic → component
ThemesLight, dark, high contrast
Core testAlias + contrast resolution
ExportDTCG, CSS, Tailwind, TS

Use three token layers with different responsibilities

A stable color system separates available colors, product meaning, and component implementation.

Primitive tokens describe the source scale without assigning product meaning. Semantic tokens describe roles such as text, canvas, border, primary action, focus, or danger. Component tokens narrow those roles to an explicit state such as a primary button hover background.

This separation makes theme changes and migrations easier to review because a component can inherit a semantic role instead of copying a raw HEX value.

A traceable token path
LayerExampleResponsibility
Primitiveprimitive.brand.600Canonical source color
Semanticsemantic.action.primaryProduct intent
Componentcomponent.button.primary.backgroundExplicit implementation state

Generate a perceptual primitive scale

Build enough lightness range for backgrounds, borders, controls, text, and dark-mode adaptation.

  1. 1

    Normalize the supplied brand color and preserve it as the canonical brand token.

  2. 2

    Generate lighter and darker steps with a perceptual color model such as OKLCH.

  3. 3

    Limit chroma at very light and very dark steps when the requested color leaves the display gamut.

  4. 4

    Measure actual contrast for the combinations that will be used; do not assume a numeric shade name guarantees accessibility.

Map semantic roles before component details

Semantic roles let multiple components share intent across themes.

  • Canvas, surface, and subtle backgrounds
  • Primary, secondary, inverse, and disabled text
  • Default and strong boundaries
  • Primary action, hover, active, and on-primary content
  • Focus-visible indicator
  • Success, warning, danger, and informational status

Resolve aliases independently in every theme

A token path can keep the same name while its resolved value changes by context.

A dark theme should not be implemented by mechanically inverting every light value. Surfaces, text hierarchy, chroma, boundaries, focus indicators, and status colors need contextual review.

A resolver should expose missing aliases and circular references rather than silently replacing them. Token lineage makes it possible to trace a component value back to its semantic and primitive origin.

JSON example
{
  "component": {
    "button": {
      "primary": {
        "background": { "$type": "color", "$value": "{semantic.action.primary}" }
      }
    }
  }
}

Validate constraints and component states

Test resolved pairings and state coverage, not isolated swatches.

Minimum evidence to review
AreaExample evidenceWhy it matters
TextLabel against button fillReadable content
BoundaryInput border against canvasVisible component edge
FocusFocus ring against adjacent colorsKeyboard location
StatesDefault, hover, active, disabled, errorComplete interaction model
AliasesMissing and circular referencesReliable build output

Export a complete handoff pack

A useful export contains resolved values, source structure, theme context, and limitations.

Export source tokens for design-token tooling and resolved theme values for product implementation. Include version information, a migration note, and a project backup so future changes can be compared.

DTCG-based output improves interoperability, but teams must still validate the specific parser, resolver, build pipeline, and framework version used in production.

Put the guide into practice

Build a traceable color system

Generate themes, inspect token lineage, test constraints, repair failures, and export the complete token pack.

Open Design System Doctor

Frequently asked questions

Should semantic tokens contain raw HEX values?

They can, but aliases usually make ownership and theme changes easier to trace. Use a raw value when it is genuinely unique and document why it does not inherit from a primitive.

How many semantic color tokens should a system have?

There is no universal number. Use enough roles to express product meaning without creating multiple names for the same purpose. Track unused, duplicate, and overlapping roles as the system grows.

Can one token architecture support multiple brands?

Yes. Keep the semantic and component structure stable, replace the brand primitives, then independently audit each brand because the same role mapping can produce different contrast results.

Does OKLCH guarantee accessible colors?

No. OKLCH is useful for perceptual editing, but accessibility depends on the final rendered foreground and background combinations.

Primary references

These sources support the standards and technical explanations in this guide. Color Pick recommendations and product-specific limitations are identified separately in the article.

  1. Design Tokens Format Module 2025.10W3C Design Tokens Community Group
  2. Design Tokens Resolver Module 2025.10W3C Design Tokens Community Group
  3. ColorsTailwind CSS
  4. Understanding Success Criterion 1.4.3: Contrast (Minimum)W3C Web Accessibility Initiative
Keep it colorful

Enjoying Color Pick?

Color Pick stays free, private, and account-free. Optional donations help cover hosting, testing, and new color tools.

Donate via SociabuzzOptional. Every tool remains free.