Color Scale Generator

One brand color in, eleven steps out: 50 to 950, the format Tailwind and most design systems use. Copy the scale as CSS variables or a Tailwind config.

Building Color Scales for Design Systems: The 50–950 Approach Explained

Look inside a mature design system and you won’t find “the blue”. You will find blue-50 through blue-950: eleven steps from almost white to almost black, all with the same character. This numbered scale approach, popularised by Material Design and Tailwind CSS, has become the standard way to organise interface colors. It solves real problems, and it is easy to build your own.

Design system color scale with eleven steps from 50 to 950

Why a scale instead of a few colors

An interface uses a single hue in many roles. Take a primary blue:

  • a very pale blue background for a selected row,
  • a light blue border for a focused input,
  • the main blue for buttons,
  • a darker blue for the button’s hover state,
  • a deep blue for link text that needs high contrast,
  • an almost-black blue for headings in some themes.

Without a system, designers invent each variation on the spot, and you end up with dozens of slightly different blues. A scale defines these variations once, in a predictable order, so everyone picks from the same set.

What the numbers mean

The convention is that the number roughly tracks darkness: 50 is the lightest and 950 is the darkest, with 500 as the “base” color. The numbers are labels, not percentages, but they leave room for inserting steps later.

StepTypical lightnessCommon uses
50~97%Page or section backgrounds, subtle highlights
100~93%Hover backgrounds, selected rows, badge backgrounds
200~86%Borders, dividers, disabled backgrounds
300~76%Stronger borders, decorative elements
400~64%Icons, placeholder graphics, dark-mode text accents
500~52%The base color: illustrations, large UI areas
600~43%Primary buttons, links on white (often first to pass 4.5:1)
700~35%Hover and pressed states, text
800~27%High-contrast text, dark surfaces
900~20%Headings, dark mode surfaces
950~12%Darkest backgrounds, dark mode base

These lightness values are the targets the color scale generator above uses. Real systems tune each step by eye.

The key rule: same number, same role

The power of a scale comes from consistency across hues. If blue-100 is a selected-row background, then green-100 should work as a success background, and red-100 as an error background, with similar lightness. Components can then swap color families without redesigning: an alert component uses {color}-50 for its background, {color}-200 for its border and {color}-800 for its text, and it works for info, success, warning and error alike.

This only works if each step has a similar perceived lightness across hues, which is harder than it sounds.

The yellow problem

In HSL, all hues at 50% lightness are “equally light” on paper, but yellow at 50% lightness looks far brighter than blue at 50%. That means a naive scale gives you a yellow-600 that is still too light for text, while blue-600 is already quite dark.

Design systems handle this in a few ways:

  1. Tune per hue. Tailwind’s default palette was adjusted by hand; its yellows are noticeably darker and more orange at the 600–900 steps.
  2. Shift hue as lightness changes. Dark yellows shift toward orange-brown, and light blues shift slightly toward cyan, mimicking how real materials look in shadow and light.
  3. Use a perceptual color space. In OKLCH, the L value matches perceived lightness, so the same L gives similar brightness across hues. Tailwind CSS v4 defines its default palette in OKLCH for this reason.

Saturation at the extremes

If you keep saturation constant, very light tints can look neon and very dark shades can look oversaturated and heavy. Most good scales reduce saturation slightly at both ends. Our generator reduces it by about 10–15% at the lightest and darkest steps, which keeps tints soft and shades rich without going muddy.

Placing your exact brand color

Your brand color won’t land exactly on one of the generated steps. Two common approaches:

ApproachHowProsCons
Snap to nearest stepReplace the closest step with the exact brand valueBrand color appears exactlySmall jump in the scale
Brand as a separate tokenKeep the scale smooth, add --brand alongsidePerfectly even scaleBrand color isn’t part of the numbered set

Our generator snaps by default (you can turn it off). For most teams, having the exact brand color in the scale is worth the tiny unevenness.

Accessibility built in

A well-built scale makes accessible choices easy to remember. Document which pairs pass:

  • text on white: usually 600 or darker for normal text,
  • white text on a filled button: usually 600 or 700 and darker,
  • text on 50/100 backgrounds: 700 or darker.

Verify each with a contrast checker, because exact results depend on the hue. Record the passing pairs in your documentation so nobody needs to check again. Our WCAG contrast guide explains the thresholds.

Neutral scales

Every system also needs a grey scale, and the best ones aren’t pure grey. Adding a tiny amount of your brand hue (saturation around 3–10%) to neutrals makes the whole interface feel cohesive. Tailwind ships several neutral families (slate, gray, zinc, neutral, stone) precisely because tinted greys change the feel of an interface so much: slate is cool and blue-ish, stone is warm.

Exporting the scale

Scales usually live in three places:

  • CSS custom properties for the website: --brand-500: #8a6d3b;
  • Tailwind config (or CSS theme variables in Tailwind v4) for utility classes.
  • Design tool variables in Figma, so designers and developers use the same names.

Keep one source of truth, ideally a JSON or token file, and generate the others from it.