ColorContract

Your brand color in dark mode

A brand color with good contrast on white often has less on a dark background, and the other way around. Dark mode is therefore not an inversion: every use of the brand is checked again.

Why inversion doesn't work

WCAG contrast compares luminance. A dark color moves away from white and toward black: a deep blue or purple, perfect on white, turns dull on a dark background. A light color does the opposite: a yellow that is illegible on white can carry everything on a dark background.

Each role picks its step, mode by mode

In dark mode, each role points to different steps, and every combination is checked again. WCAG stays the minimum; ColorContract aims a little higher in dark mode (targets × 1.15), keeps default text at least as contrasted as in light mode, and avoids pure white for text, which causes halation on black.

The brand in dark mode

If the brand reaches 3:1 on the dark background, and a text color reaches 4.5:1 on it and on its hover and pressed states, it stays the action background. Otherwise another step of the brand takes over, often a lighter one. For text or a link in the brand color, a lighter brand.text variant is computed if the brand does not reach 4.5:1.

The dark background is yours: black, a neutral step or a code you enter (L* ≤ 25). Thresholds are always computed against that real background.

Seven brand colors in dark mode

Figures computed by the current algorithm, on a black background, at AA.

BrandBrand on blackAction backgroundButton textText in the brand color
Blue #2563EB4.06:1 pass
#2563EB 4.06:1 passthe brand as is
#F6F8FA 4.85:1 passneutral 50
#2C6BF3 4.50:1 passvariant brand.text
Red #E11D484.47:1 pass
#E11D48 4.47:1 passthe brand as is
#FFFFFF 4.69:1 passwhite
#E21E48 4.51:1 passvariant brand.text
Yellow #FACC1513.71:1 pass
#FACC15 13.71:1 passthe brand as is
#151C21 11.24:1 passneutral 950
#FACC15 13.71:1 passthe brand as is
Green #16A34A6.37:1 pass
#16A34A 6.37:1 passthe brand as is
#151C21 5.22:1 passneutral 950
#16A34A 6.37:1 passthe brand as is
Purple #7C3AED3.68:1 pass
#8D65F0 5.25:1 passbrand step 500
#000000 5.25:1 passblack
#894CFD 4.51:1 passvariant brand.text
Orange #FF6A007.31:1 pass
#FF6A00 7.31:1 passthe brand as is
#191B22 5.98:1 passneutral 950
#FF6A00 7.31:1 passthe brand as is
Muted brand #6B7F8E5.05:1 pass
#6B7F8E 5.05:1 passthe brand as is
#000000 5.05:1 passblack
#6B7F8E 5.05:1 passthe brand as is

Check both modes

ColorContract's preview builds four pages with your tokens, light and dark stacked, and the export holds both modes in the same file, with their accessible combinations.

Open the toolHow it worksExamplesFAQComparisonGuides: Your brand color fails contrast