Skip to main content

Blog

Brand colours that pass contrast (and still look like your brand)

· 5 min read

How to keep your brand colours and still meet WCAG contrast: the 4.5:1 and 3:1 rules, darker text shades, swapping text colour, and where to change colours in WordPress, Shopify and Webflow.

Blog cover with the title: Brand colours that pass contrast (and still look like your brand).

Low colour contrast is one of the most common accessibility problems on the web. Year after year, the WebAIM Million study of the top one million home pages finds low-contrast text on most of them.

The usual reason isn't carelessness. It's a brand colour. Someone picked a bright orange, a fresh green or a soft sky blue, and then used it for text and buttons with white on top. It looks great in a logo and is hard to read in a paragraph.

The good news: you rarely have to give up your brand colour. You usually need a second, darker shade of it, and a few rules about where each one goes.

The rules in one minute

WCAG, the Web Content Accessibility Guidelines, sets these minimums at level AA:

  • Normal text: 4.5:1 against its background (success criterion 1.4.3).
  • Large text: 3:1. Large means at least 18 point (about 24 CSS pixels), or 14 point bold (about 18.66 CSS pixels bold).
  • Buttons, form field borders, icons and chart parts: 3:1 against what's next to them (success criterion 1.4.11).

The ratio runs from 1:1 (the same colour twice) to 21:1 (black on white). A few things are exempt: logos and brand names in a logo, disabled controls and purely decorative text.

So your logo can stay exactly as it is. The rules apply to the text and controls people need to read and use.

Why bright brand colours fail

Bright, saturated colours are light in the way contrast is measured, even when they feel strong. Some real numbers, all against white:

  • Bright orange #F97316: 2.80:1. Fails for any text.
  • Bright green #22C55E: 2.28:1. Fails for any text.
  • Medium blue #3B82F6: 3.68:1. Passes for large text and icons, fails for body text.
  • Light grey #999999: 2.85:1. The classic "subtle" footer text, and it fails.

You can check any pair yourself with our contrast checker.

Five ways to keep your brand and pass

1. Add a darker "text shade" of each brand colour

Keep the bright colour for big shapes, backgrounds, illustrations and the logo. Add a darker shade of the same hue for text and links.

  • Orange #F97316 becomes #C2410C for text: 5.18:1 on white.
  • Green #22C55E becomes #15803D: 5.02:1 on white.
  • Blue #3B82F6 becomes #1D4ED8: 6.70:1 on white.

Next to each other, they still read as the same brand. Most design systems already work this way: a palette has 9 or 10 steps per colour, and text uses one of the darker steps.

/* Before: the bright brand orange is used for everything */
:root { --brand: #F97316; }
a, .price { color: var(--brand); }

/* After: bright for shapes, dark for text */
:root {
  --brand: #F97316;       /* backgrounds, icons, illustrations */
  --brand-text: #C2410C;  /* text and links on white: 5.18:1 */
}
a, .price { color: var(--brand-text); }
.hero { background: var(--brand); }

2. Swap the text colour, not the button colour

If your buttons must stay bright orange, put dark text on them instead of white. White on #F97316 is 2.80:1. Dark grey #1F2937 on the same orange is 5.24:1, and the button looks the same from across the room.

/* Before: 2.80:1 */
.button { background: #F97316; color: #FFFFFF; }

/* After: 5.24:1, same orange */
.button { background: #F97316; color: #1F2937; }

Many brands do this on yellow and lime buttons already. It works for orange, green and light blue too.

3. Make the text bigger and bolder where it fits

Large text only needs 3:1. A hero heading at 32 pixels in medium blue #3B82F6 (3.68:1) passes. The same blue in a 16-pixel paragraph doesn't. So the bright colour can stay on big headings and short display lines, and the darker shade takes over in body text.

4. Fix the greys

Grey text is where most sites lose contrast without noticing: captions, dates, placeholders, footers and "small print". On white, #767676 is about the lightest grey that passes (4.54:1). If you want more breathing room, #595959 gives 7.00:1.

Placeholder text inside form fields counts as text too. If it's too light to read, it's too light to be the only hint, so put the instruction in a visible label (see form labels).

5. Don't let colour carry the meaning alone

Contrast is one part; the other is not relying on colour by itself. A link that differs from the paragraph around it only by colour, or a form error shown only as a red border, is hard to spot for people with colour vision deficiency. Underline links in body text, and add an icon or a short message to errors. WCAG covers this in success criterion 1.4.1, Use of Color.

Where to change colours on common platforms

  • WordPress (block themes): Appearance → Editor → Styles → Colors. Change the palette entries and the text and link colours. Check buttons under Blocks → Button. Classic themes usually have colours in Appearance → Customize.
  • Shopify: Online Store → Themes → Customize → Theme settings → Colors. Most themes use colour schemes: check the text and button label colour in each scheme, not just the main one.
  • Webflow: set your colours as variables (or swatches), then update them once. Check the Body (All pages) text colour and the colour of every button class.
  • Wix and Squarespace: open the site's colour or theme settings. Both build palettes from a few base colours, so check which shade ends up as text on each section background.

After changing a palette, look at the pages with the most colour: the home page hero, buttons, the footer, sale badges and the cart.

What a checker can and can't tell you

Automated tools are very good at contrast. They read the actual text and background colours and calculate the ratio for every piece of text, which is far faster than checking by eye.

They have limits. Text on top of a photo or a gradient often can't be measured reliably, so check those by hand: add a dark overlay behind the text or move the text off the image. And automated checks find only part of all WCAG issues; contrast is one of the parts they handle well, not the whole picture.

Our guide to fixing colour contrast has more code examples, and the 6 accessibility problems on almost every website shows where contrast sits among the other common issues.

Try it on your own site

Run the free checker on your home page: it lists every text element below the required ratio, with the colours it found and the ratio. Then pick a darker text shade for each brand colour, put it in your theme settings, and scan again.

Stuck on a colour that won't work? Ask in our free Website Accessibility Help group on Facebook: post the two colours, and people will suggest shades that keep your brand.

Automated testing detects only a portion of WCAG issues. Manual testing is required to assess full conformance. This article is general information, not legal advice.

All blog posts