Command Palette

Search for a command to run...

Foundations

Color system

How Nimbus's palette is built so contrast stays predictable no matter which hue you reach for.

Nimbus's palette is built to be:

  • Accessible by construction. Every hue family holds roughly the same contrast ratio at the same step, so step 500 or darker is a safe bet for text on a light background — in any of the ten families.
  • Consistent across hues. Reaching for ruby-700 and ocean-700 should feel the same, not just look thematically related.
  • Scalable. A new hue family can be added later without inventing new rules — it just inherits the same eleven-step ramp every other family uses.

Why hue-independent contrast is hard

Brightness, as HSB or raw RGB defines it, doesn't match how bright a color actually looks to a human eye. A saturated yellow and a saturated blue at the "same" HSB brightness value can differ enormously in perceived lightness and, as a result, in contrast against white. Build a palette by picking a hue and sliding its HSB brightness down in even steps, and the ramps end up inconsistent: some hues cross the WCAG AA text threshold (4.5:1) two or three steps earlier than others.

This is the same problem other design teams have written about publicly — Goldman Sachs' color system write-up is a good account of solving it by hand, testing each ramp's contrast ratio and adjusting saturation and brightness swatch by swatch until every ramp lined up.

Our approach: a perceptual palette

Nimbus's ten hue families — sky, lavender, ocean, emerald, gold, amber, ruby, graphite, stone and slate — are built the other way around: each of the eleven steps (50 through 950) targets a consistent perceptual lightness across every family, rather than a consistent HSB brightness value. Pick any family, land on step 500, and you land on roughly the same perceived lightness — and the same contrast against white — every time.

Verified, not asserted

The table below isn't a claim — it's computed straight from the hex values shipped in cc-design-tokens, using the WCAG relative-luminance formula.

Stepskylavenderoceanemeraldgoldamberrubygraphitestoneslate
501.051.051.051.051.051.051.051.051.051.05
1001.101.101.101.111.111.111.101.111.101.10
2001.201.211.211.211.211.211.211.201.211.21
3001.521.521.521.521.531.521.521.531.521.52
4002.632.622.622.622.622.622.632.612.632.63
5004.545.074.594.554.584.554.574.544.574.59
6006.196.166.156.216.176.206.176.196.226.19
7008.728.758.758.758.728.768.778.728.748.72
80011.6711.6911.6311.6511.7211.7311.6811.7311.7211.67
90015.0014.9915.0214.9615.0015.0415.0514.9414.9514.99
95017.5117.5417.4417.4517.5717.4317.5217.5817.4317.46

Contrast ratio against white. Green cells clear the WCAG AA threshold for normal text (4.5:1).

Step 500 clears the WCAG AA threshold for normal text (4.5:1) in every one of the ten families, within a few hundredths of each other. Steps 50 through 300 sit well under that threshold across the board — they're built for fills and large surfaces, not body text, regardless of hue.

Choosing accessible pairs

Because contrast holds steady by step rather than by hue, the rule of thumb is the same everywhere in the palette:

Do
Use step 500 or darker for text on a white or light background — true for every hue family.
Don't
Use step 300 or lighter for body text. It reads as a fill color at that step, not text, in every family.

This is also why Nimbus's semantic tokens (color-primary-100 through color-primary-500, and the equivalent for success, error and the rest) only ever span five steps: the lightest four are surfaces and borders, and 500 is where text becomes safe.

The result

sky
lavender
ocean
emerald
gold
amber
ruby
graphite
stone
slate

These are the same ten families documented on the Colors page, where each step also resolves to its palette alias and hex value.