Color contrast

Color contrast is the difference in luminance between text and its background, measured as a ratio, that determines whether content is readable.

Summarize this

What is color contrast?

Color contrast is the difference in brightness between a foreground colour, such as text or an icon, and the background behind it. It is expressed as a ratio from 1:1 (no contrast) to 21:1 (black on white). The higher the ratio, the easier the content is to read, especially for people with low vision, colour blindness or a screen in bright sunlight.

Contrast is both a design principle and a legal and accessibility requirement in many countries.

WCAG contrast ratios

The Web Content Accessibility Guidelines (WCAG) define minimum ratios based on text size and conformance level.

ElementLevel AALevel AAA
Normal text4.5:17:1
Large text (24px, or 19px bold)3:14.5:1
UI components and icons3:13:1

Level AA is the usual target for websites and the reference for most regulations.

How the ratio is calculated

The ratio compares the relative luminance of two colours: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter colour. You do not need to compute it by hand: browser dev tools and checkers show it instantly.

/* 4.6:1 on white, passes AA */
color: #767676;
background: #ffffff;

Common mistakes

  • Light grey text on white, popular in minimal designs but often below 3:1.
  • Text placed over images or gradients without an overlay.
  • Placeholder text and disabled states that are too faint.
  • Using colour alone to convey meaning, such as red for errors with no icon or label.
  • Forgetting hover, focus and dark mode states.

Best practices

  • Test every colour pair in your palette and document the passing combinations in your design system.
  • Pair contrast with size and weight to build a clear visual hierarchy.
  • Check contrast again in dark mode, as a palette that works in light mode can fail in dark.
  • Test with a colour blindness simulator, not only with a ratio checker.

Color contrast at BeBranded

We check contrast when we build a palette, not after launch. In our design work, every colour pair is validated against WCAG AA and documented, so your brand stays readable and accessible across the website and the interface.

FAQ

It is the difference in luminance between a foreground colour and its background, expressed as a ratio. It determines how readable text and icons are.
At level AA, normal text needs 4.5:1, large text needs 3:1 and UI components need 3:1. Level AAA raises text to 7:1 and 4.5:1.
Use a contrast checker or the colour picker in your browser dev tools, which show the ratio and whether it passes AA or AAA.
In many regions, accessibility laws refer to WCAG AA, so contrast is part of compliance for public and commercial websites.
Not as a direct ranking factor, but readable pages keep visitors longer and convert better, which supports overall performance.
The ratios stay the same, but you must test the dark palette separately, since colours that pass on white can fail on a dark background.

Ready to boost your conversions?

Our team is here to understand your needs & work with you to create your next projects.
Get news, infos and resources.
Actionable tips delivered straight to your inbox.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.