Start a project

Tool 35 of 194 · Colour

Design Token Generator

Give it your brand colours and get full colour scales, a neutral scale, semantic tokens for light and dark themes that pass contrast, and code for your stack.

Design Token Generator at a glanceIllustration: 1, Brand colours; 2, processed in your browser; 3, Tokens.Design Token GeneratorAa 4.5:11Brand colours</>3Tokens2In yourbrowser
1 Brand colours 2 processed on your device 3 Tokens

Design Token Generator

Brand colours

    Scales

    Your colour keeps its exact value on the step marked with a ring.

    Semantic tokens, light and dark

    TokenUseLightDarkContrast (light)Contrast (dark)

    Export

    Tokens

    First scale on white

    Every step

    TokenHexOKLCHOn whiteOn blackText on it

    01

    What it does

    Builds 50 to 950 OKLCH colour scales from brand colours, picks light and dark semantic tokens by contrast, and exports them in five formats.

    • 11-step scales (50 to 950) with even OKLCH lightness
    • Your exact brand colour kept on its nearest step
    • Tinted or pure grey neutral scale
    • Light and dark semantic tokens (text, muted, border, accent, on-accent) chosen by contrast

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    Colour scales, semantic tokens with contrast, and CSS, Tailwind, SCSS or DTCG output, with a Copy and a Download button on every result.

    • Colour
    • Design tokens
    • Tailwind
    • OKLCH
    • CSS

    Why it matters

    A design system needs more than a brand colour: it needs tints for backgrounds, shades for hover states and text, and a neutral scale, all evenly spaced so 400 to 500 feels like the same step as 700 to 800. Scales built by mixing with white and black in RGB come out uneven and greyish, which is why Tailwind v4 moved its palette to OKLCH. Then someone has to decide which step is body text and check it actually passes contrast in dark mode.

    This generator builds each scale in OKLCH with a fixed lightness curve, shifting it so your brand colour lands exactly on its nearest step instead of being approximated, and easing chroma towards the light and dark ends so tints stay soft. It adds a neutral scale tinted with your first colour or pure grey, then chooses semantic tokens for light and dark themes by testing contrast: muted text is the lightest neutral that still reaches 4.5:1, the accent is the step nearest 600 that passes on the page background, and on-accent text is white or black, whichever APCA rates higher. Every step shows its WCAG ratio and APCA Lc on white and black, and the whole set exports as CSS variables, a Tailwind v4 @theme block, a Tailwind v3 config, SCSS maps or Design Tokens (DTCG) JSON.

    How it works

    1. InputOne or more brand colours
    2. In your browserOKLCH scales and contrast-picked semantic tokens
    3. OutputCSS, Tailwind, SCSS or DTCG

    Where it fits in a designer's workflow

    1. Plan
    2. Design
    3. Build
    4. Test
    5. Launch
    Starting a design system or a Tailwind theme.

    By the numbers

    WCAG contrast on white for each step of a scale built from #2f6fedbrand-50: 1.08:1; brand-100: 1.17:1; brand-200: 1.37:1; brand-300: 1.71:1; brand-400: 2.32:1; brand-500: 3.2:1; brand-600: 4.55:1; brand-700: 6.54:1; brand-800: 9.15:1; brand-900: 12.23:1; brand-950: 15.78:1AA text 4.5brand-501.08:1brand-1001.17:1brand-2001.37:1brand-3001.71:1brand-4002.32:1brand-5003.2:1brand-6004.55:1brand-7006.54:1brand-8009.15:1brand-90012.23:1brand-95015.78:1
    Computed by this tool: the brand colour is kept exactly as step 600, the first step that reaches 4.5:1 on white, so 600 and darker are safe for text on white and 500 and lighter are for backgrounds. Lightness falls evenly in OKLCH from step to step. Source: Tailwind CSS: Colors (OKLCH palette); Design Tokens Community Group: Color Module 2025.10.
    Show the numbers as a table
    StepHexOn whiteAPCA Lc on whiteOKLCH L %
    50#f2f7ff1.08097.5
    100#e5eeff1.17894.7
    200#caddff1.371889.4
    300#a8c7ff1.713182.7
    400#7baaff2.324674
    500#538dfa3.25965.8
    600#2f6fed4.557157.4
    700#1554d06.548249
    800#003db09.159041.3
    900#032e8212.239733.8
    950#09204f15.7810225.9

    How to use it

    1. Enter one or more brand colours.
    2. Choose the neutral scale.
    3. Check the semantic tokens pass in both themes.
    4. Pick an export format and copy or download it.

    FAQ

    Why OKLCH?

    OKLCH lightness matches how light a colour looks, so steps feel evenly spaced and the same step number has similar contrast across hues. Tailwind v4's default palette uses it for the same reason.

    Will my brand colour be changed?

    No. It's placed on whichever step its lightness is closest to and kept exactly; the rest of the scale bends around it.

    What are semantic tokens?

    Names for jobs rather than colours: text, muted, border, accent. Components use them, so switching to dark mode or a new brand only changes the token values.

    What is DTCG JSON?

    The Design Tokens Community Group format, readable by Figma plugins, Style Dictionary and Tokens Studio. Colours use the colour-space object form with a hex fallback; semantic tokens are aliases like {color.neutral.900}.

    Do I need both Tailwind outputs?

    No. Tailwind v4 reads tokens from CSS with @theme; v3 uses tailwind.config.js. Pick the one that matches your project.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk