ColorContract

Your brand color fails contrast: what should you do?

Many brand colors were chosen for a logo, not for an interface. Bright yellows, oranges, greens and teals often miss the WCAG 2.2 thresholds on a white background. The answer is not to change the brand, but to give it variants.

Three uses, three thresholds

A brand color does three jobs in an interface, and each has its WCAG 2.2 threshold. A button background must reach 3:1 against the surface (success criterion 1.4.11, user interface components). Text on the button must reach 4.5:1 on the brand (1.4.3). Text or a link written in the brand color must reach 4.5:1 on the surface.

The same color can pass one use and fail another: a bright green can be a button background on white without being legible as text.

Don't change the brand: add variants

Darkening the brand everywhere distorts it, and your print, logo and website no longer match. ColorContract keeps the brand locked: it looks in the brand scale for the closest step that meets each use, in the same hue, and applies it automatically.

The brand stays visible where it works: illustrations, decorative backgrounds, and often dark mode. A deeper step carries the buttons, and a brand.text variant carries text. The usage map, in the Brand inspector, shows these choices in light and dark, with the reason.

Text on the brand

Button text must stay legible on hover and when pressed, not only at rest. ColorContract tries the lightest neutral, the darkest neutral, then white and black, and keeps the first that reaches 4.5:1 on all three states. On a light brand, that is dark text.

If no text color works on the brand and its states, the brand cannot be the button background as is: a neighboring step takes over, even if the brand reaches 3:1 on the surface.

What ColorContract does with seven brand colors

Figures computed by the current algorithm, on a white background, at AA. Ratios are truncated, never rounded up.

BrandBrand on whiteAction backgroundButton textText in the brand color
Blue #2563EB5.16:1 pass
#2563EB 5.16:1 passthe brand as is
#F6F8FA 4.85:1 passneutral 50
#2563EB 5.16:1 passthe brand as is
Red #E11D484.69:1 pass
#E11D48 4.69:1 passthe brand as is
#FFFFFF 4.69:1 passwhite
#E11D48 4.69:1 passthe brand as is
Yellow #FACC151.53:1 fail
#896406 5.39:1 passbrand step 600
#F1F9FE 5.07:1 passneutral 50
#8F7304 4.54:1 passvariant brand.text
Green #16A34A3.29:1 pass
#0E7B36 5.37:1 passbrand step 600
#F1F9FD 5.04:1 passneutral 50
#04893B 4.51:1 passvariant brand.text
Purple #7C3AED5.69:1 pass
#7C3AED 5.69:1 passthe brand as is
#F6F8FA 5.35:1 passneutral 50
#7C3AED 5.69:1 passthe brand as is
Orange #FF6A002.87:1 fail
#B84500 5.39:1 passbrand step 600
#F6F8FA 5.07:1 passneutral 50
#C85202 4.50:1 passvariant brand.text
Muted brand #6B7F8E4.15:1 pass
#6B7F8E 4.15:1 passthe brand as is
#000000 5.05:1 passblack
#667988 4.51:1 passvariant brand.text

What if you want the brand on your buttons?

In the Brand inspector, "Keep the brand for buttons" puts the brand back as is, with a justification. The combination still fails, and the export documents it as an exception: your team knows why, and where.

Open the toolHow it worksExamplesFAQComparisonGuides: Your brand color in dark mode