Skip to content
Aback Tools Logo

Design System Color Tokens

Generate a complete set of design system colour tokens from 7 base colours - primary, secondary, accent, success, warning, error, and info. Each colour gets 9 automatically derived variants (base, light, dark, hover, active, bg, border, text, muted) for both light and dark modes. Export as CSS custom properties or JSON. All processing runs in your browser - free, no signup required.

Design System Color Tokens

Generate a complete set of design system colour tokens from 7 base colours. Get light and dark mode variants with CSS variables and JSON export - perfect for design systems, component libraries, and theme files.

Main brand colour used for primary actions, active states, and key UI elements

#3B82F6

Supporting brand colour for secondary actions and complementary elements

#8B5CF6

Highlight colour for emphasis, badges, and call-to-action elements

#F59E0B

Positive feedback - confirmations, success messages, and valid states

#10B981

Cautionary feedback - warnings, low-priority alerts, and pending states

#F97316

Negative feedback - errors, destructive actions, and invalid states

#EF4444

Informational feedback - tooltips, helper text, and neutral notifications

#06B6D4

Primary

base
#3b82f6
light
#e2ecfe
dark
#0f213e
hover
#326fd1
active
#295bac
bg
#f5f9ff
border
#9dc1fb
text
#000000
muted
#336ecc

Secondary

base
#8b5cf6
light
#eee7fe
dark
#23173e
hover
#764ed1
active
#6140ac
bg
#f9f7ff
border
#c5aefb
text
#000000
muted
#6133cc

Accent

base
#f59e0b
light
#fef0da
dark
#3d2803
hover
#d08609
active
#ac6f08
bg
#fffaf3
border
#facf85
text
#000000
muted
#cc9433

Success

base
#10b981
light
#dbf5ec
dark
#042e20
hover
#0e9d6e
active
#0b825a
bg
#f3fcf9
border
#88dcc0
text
#000000
muted
#33cc99

Warning

base
#f97316
light
#feeadc
dark
#3e1d06
hover
#d46213
active
#ae510f
bg
#fff8f3
border
#fcb98b
text
#000000
muted
#cc7333

Error

base
#ef4444
light
#fde3e3
dark
#3c1111
hover
#cb3a3a
active
#a73030
bg
#fef6f6
border
#f7a2a2
text
#000000
muted
#cc3333

Info

base
#06b6d4
light
#daf4f9
dark
#022e35
hover
#059bb4
active
#047f94
bg
#f3fbfd
border
#83dbea
text
#000000
muted
#33b5cc
:root {
  /* Light mode colour tokens */
  --color-primary-base: #3b82f6;
  --color-primary-light: #e2ecfe;
  --color-primary-dark: #0f213e;
  --color-primary-hover: #326fd1;
  --color-primary-active: #295bac;
  --color-primary-bg: #f5f9ff;
  --color-primary-border: #9dc1fb;
  --color-primary-text: #000000;
  --color-primary-muted: #336ecc;
  --color-secondary-base: #8b5cf6;
  --color-secondary-light: #eee7fe;
  --color-secondary-dark: #23173e;
  --color-secondary-hover: #764ed1;
  --color-secondary-active: #6140ac;
  --color-secondary-bg: #f9f7ff;
  --color-secondary-border: #c5aefb;
  --color-secondary-text: #000000;
  --color-secondary-muted: #6133cc;
  --color-accent-base: #f59e0b;
  --color-accent-light: #fef0da;
  --color-accent-dark: #3d2803;
  --color-accent-hover: #d08609;
  --color-accent-active: #ac6f08;
  --color-accent-bg: #fffaf3;
  --color-accent-border: #facf85;
  --color-accent-text: #000000;
  --color-accent-muted: #cc9433;
  --color-success-base: #10b981;
  --color-success-light: #dbf5ec;
  --color-success-dark: #042e20;
  --color-success-hover: #0e9d6e;
  --color-success-active: #0b825a;
  --color-success-bg: #f3fcf9;
  --color-success-border: #88dcc0;
  --color-success-text: #000000;
  --color-success-muted: #33cc99;
  --color-warning-base: #f97316;
  --color-warning-light: #feeadc;
  --color-warning-dark: #3e1d06;
  --color-warning-hover: #d46213;
  --color-warning-active: #ae510f;
  --color-warning-bg: #fff8f3;
  --color-warning-border: #fcb98b;
  --color-warning-text: #000000;
  --color-warning-muted: #cc7333;
  --color-error-base: #ef4444;
  --color-error-light: #fde3e3;
  --color-error-dark: #3c1111;
  --color-error-hover: #cb3a3a;
  --color-error-active: #a73030;
  --color-error-bg: #fef6f6;
  --color-error-border: #f7a2a2;
  --color-error-text: #000000;
  --color-error-muted: #cc3333;
  --color-info-base: #06b6d4;
  --color-info-light: #daf4f9;
  --color-info-dark: #022e35;
  --color-info-hover: #059bb4;
  --color-info-active: #047f94;
  --color-info-bg: #f3fbfd;
  --color-info-border: #83dbea;
  --color-info-text: #000000;
  --color-info-muted: #33b5cc;

  /* Dark mode colour tokens */
  --color-mode: light;
}

[data-theme="dark"], .dark {
  --color-primary-base: #0b3d8e;
  --color-primary-light: #dae2ee;
  --color-primary-dark: #030f24;
  --color-primary-hover: #093479;
  --color-primary-active: #082b63;
  --color-primary-bg: #f3f5f9;
  --color-primary-border: #859ec7;
  --color-primary-text: #ffffff;
  --color-primary-muted: #336ecc;
  --color-secondary-base: #3d0eaa;
  --color-secondary-light: #e2dbf2;
  --color-secondary-dark: #0f042b;
  --color-secondary-hover: #340c91;
  --color-secondary-active: #2b0a77;
  --color-secondary-bg: #f5f3fb;
  --color-secondary-border: #9e87d5;
  --color-secondary-text: #ffffff;
  --color-secondary-muted: #6133cc;
  --color-accent-base: #f5c470;
  --color-accent-light: #fef6ea;
  --color-accent-dark: #3d311c;
  --color-accent-hover: #d0a75f;
  --color-accent-active: #ac894e;
  --color-accent-bg: #fffcf8;
  --color-accent-border: #fae2b8;
  --color-accent-text: #000000;
  --color-accent-muted: #cc9433;
  --color-success-base: #d1faec;
  --color-success-light: #f8fefc;
  --color-success-dark: #343f3b;
  --color-success-hover: #b2d5c9;
  --color-success-active: #92afa5;
  --color-success-bg: #fdfffe;
  --color-success-border: #e8fdf6;
  --color-success-text: #000000;
  --color-success-muted: #33cc99;
  --color-warning-base: #f8b07c;
  --color-warning-light: #fef3eb;
  --color-warning-dark: #3e2c1f;
  --color-warning-hover: #d39669;
  --color-warning-active: #ae7b57;
  --color-warning-bg: #fffbf8;
  --color-warning-border: #fcd8be;
  --color-warning-text: #000000;
  --color-warning-muted: #cc7333;
  --color-error-base: #891010;
  --color-error-light: #eddbdb;
  --color-error-dark: #220404;
  --color-error-hover: #740e0e;
  --color-error-active: #600b0b;
  --color-error-bg: #f9f3f3;
  --color-error-border: #c48888;
  --color-error-text: #ffffff;
  --color-error-muted: #cc3333;
  --color-info-base: #4ddbf5;
  --color-info-light: #e4fafe;
  --color-info-dark: #13373d;
  --color-info-hover: #41bad0;
  --color-info-active: #3699ac;
  --color-info-bg: #f6fdff;
  --color-info-border: #a6edfa;
  --color-info-text: #000000;
  --color-info-muted: #33b5cc;
  --color-mode: dark;
}

Complete Token Generation

Generate production-ready design tokens from just your base colours.

7 Semantic Categories
Primary, secondary, accent, success, warning, error, and info - each with a full set of derived variants including base, light, dark, hover, active, bg, border, text, and muted.
Light & Dark Mode
Every colour token is automatically adapted for dark mode using a perceptual lightness inversion that preserves readability and visual hierarchy in dark themes.
Intelligent Variants
Hover, active, bg, border, and text-on-colour variants are generated automatically using luminance-aware blending - no manual tweaking required for WCAG-friendly contrast.
CSS + JSON Export
Copy ready-to-use CSS custom properties for both :root and [data-theme="dark"] selectors, or export a complete JSON token file for integration with design tools and build pipelines.

Common Use Cases

From design systems to dark mode - colour tokens power consistent UIs.

Design System Development

Generate consistent colour tokens for your component library or design system. Use the exported CSS variables across all your components for a single source of truth.

Design Handoff

Convert Figma or Sketch design tokens into developer-ready CSS variables and JSON files. Eliminate manual colour mapping errors between design and development.

Theming & White-Labeling

Create multiple token sets for different brands or themes. Each set gets consistent light/dark variants automatically - perfect for multi-tenant SaaS products.

Dark Mode Implementation

Stop manually guessing dark mode colours. Enter your light palette once and get WCAG-friendly dark mode tokens instantly with no on-the-fly calculations.

Framework Migration

When migrating between CSS frameworks or adding a design system mid-project, generate consistent colour tokens that work with Tailwind, vanilla CSS, or CSS-in-JS.

E-commerce & Marketing Sites

Maintain brand consistency across landing pages, product catalogs, and checkout flows with a single set of semantic colour tokens shared across all pages.

About Design System Color Tokens

Understand how colour tokens work and how to use them in your projects.

What Are Design System Color Tokens?

Design system colour tokens are semantic variable names that abstract hard-coded colour values into meaningful, reusable identifiers. Instead of using hex codes directly - which are hard to maintain and impossible to theme - you use names like --color-primary-base or --color-error-hover. This allows consistent styling across components and instant theme switching.

How Light Mode Tokens Are Generated

For each base colour, we derive 9 token variants: base (the original), light (85% white mix), dark (75% black mix), hover (15% darker), active (30% darker), bg (95% white mix), border (50% white mix), text (black or white for contrast), and muted (reduced saturation). The text variant uses WCAG luminance to ensure readable contrast against the base colour.

How Dark Mode Tokens Are Adapted

Dark mode tokens use a perceptual lightness inversion algorithm. Light base colours are shifted toward the dark end of the spectrum, while preserving hue and saturation relationships. The result maintains the visual hierarchy of the original palette while being comfortable to view on a dark background.

Using the Exported Tokens

The CSS output includes :root and [data-theme="dark"] blocks with all token variables ready to paste into your project. The JSON output uses a flat key-value format compatible with Design Token specification patterns. Drag-and-drop into your design tool or import via a build script for a fully automated workflow.

Frequently Asked Questions

Everything you need to know about design system colour tokens.

What are design system colour tokens?

Colour tokens are semantic variables that represent colours in a design system. Instead of using raw hex codes everywhere, you use names like --color-primary or --color-error-bg. This makes it trivial to update colours globally, implement dark mode, maintain consistency across components, and hand off designs between teams.

How many token variants are generated per colour?

Each base colour generates 9 variants: base (the original colour), light (mixed with white), dark (mixed with black), hover (slightly darker for interactive states), active (even darker for pressed states), bg (very light for backgrounds), border (muted for borders), text (black or white for readable text on the base colour), and muted (reduced saturation for secondary elements).

How is the dark mode adaptation calculated?

The dark mode adaptation uses a perceptual inversion algorithm. Lightness values are mapped through a curve that preserves the relative contrast relationships of the original palette while shifting everything into a comfortable range for dark backgrounds. Saturation is slightly reduced in dark mode because highly saturated colours can be uncomfortable to read on dark backgrounds.

Are the text-on-colour tokens WCAG compliant?

Yes. The text variant for each colour token uses luminance calculations to automatically choose between black (#000000) and white (#ffffff) text, ensuring at least 7:1 contrast ratio against the base colour. This meets WCAG AAA requirements for normal text.

Can I export tokens for use with Tailwind CSS?

Yes. The CSS variables exported from this tool can be referenced in your Tailwind config to create a custom colour scale. The JSON export can also be transformed by build tools like Style Dictionary or Theme UI into Tailwind-compatible format.

How should I structure my CSS variables file?

We recommend keeping the exported :root block in a variables.css file that is imported globally. The [data-theme="dark"] block should be applied conditionally - either via a class toggle in JavaScript or by using the CSS prefers-color-scheme media query as a fallback.

What happens if I change just one base colour?

All 9 variants for that category (plus its dark mode equivalents) are automatically recalculated. If you have already applied the tokens in your codebase, updating the base colour in this tool and re-exporting will give you a complete new set to paste in.

Can I use these tokens with CSS-in-JS libraries?

Yes. The CSS variables output works with any framework that supports CSS custom properties - styled-components, Emotion, Theme UI, Stitches, vanilla-extract, and more. Simply inject the CSS variables at the root level and reference them in your component styles.