Contrastproof
Writing

White text on your brand color almost certainly fails

2 min read

Key takeaways

  • White on a mid-tone brand color typically lands between 2:1 and 4:1, which fails AA for button labels.
  • The usual fix is to put near-black text on the brand fill instead of white, which often passes comfortably without touching the brand color at all.
  • A button fill owes 3:1 to the page behind it. Its label owes 4.5:1 to the fill, not to the page. These are two separate checks and both must pass.
  • Oranges, yellows, limes and cyans are the worst offenders, because green dominates relative luminance.
  • If neither white nor near-black clears 4.5:1 on the fill, the brand color is too mid-toned for a filled button and needs a darkened variant for that one use.

Why it happens so reliably

Relative luminance weights green at 0.7152, red at 0.2126 and blue at 0.0722. A saturated orange or lime is far brighter to that formula than it looks to a designer choosing it, so white sitting on it has much less room than expected.

Brand colors are also chosen at large sizes, on a logo or a hero, where the 3:1 large text bar applies. The button label is 15px, where the bar is 4.5:1, and nobody re-checks.

What it looks like

Substack's Subscribe button is a real example, and it is a well-designed product. White on their orange:

White on the brand orange
#ffffff on #ff671915px · 400 · needs 4.5:12.91:1fix #313031 (4.51:1)

Now the same button with near-black text instead. The brand color is untouched:

Near-black on the same orange
#313031 on #ff671915px · 400 · needs 4.5:14.51:1

A filled button is two checks, not one

People conflate these constantly. They are separate, and both are required:

WhatAgainst whatNeeds
The labelThe button fill4.5:1 (3:1 if large)
The fill's own edgeThe page behind it3:1

The second one catches dark-mode buttons in particular. A violet that is fine on a light page can sit at 2.6:1 against a dark card, which is a button with no visible boundary. Our own palette test caught exactly that on this site.

Fixing it without losing the brand

  1. 1.Try near-black on the fill first. It costs nothing and it usually wins.
  2. 2.If the brand color is dark, try white. One of the two almost always clears 4.5:1.
  3. 3.If neither does, the color is too mid-toned for a filled button. Darken it for that use only, holding hue in OKLCh so it stays recognisably the brand.
  4. 4.Never solve it by making the label bigger unless the button was genuinely meant to be large. 24px button text to dodge a contrast check is a worse design than a darker fill.

Common questions

Does white text on a brand color need to pass contrast?
Yes. A button label is text and needs 4.5:1 against the fill it sits on, or 3:1 if it is 24px or larger, or 18.66px at weight 700 or more.
Should I change my brand color if white fails on it?
Usually not. Try near-black text on the same fill first; on most mid-tone and light brand colors it passes comfortably. Only if neither white nor near-black clears the threshold does the fill itself need a darkened variant.
Does the button itself need contrast against the page?
Yes, 3:1, as a user interface component. That is a separate check from the label, and it is the one that catches buttons on dark backgrounds.

Find out which of these your own site does.

Free, no account, usually under 30 seconds.