Conversion and UX

Contrast

Also called colour contrast, contrast ratio

The brightness difference between two colours, which decides whether text can be read and whether a button gets noticed.

Quick facts: Contrast

Category
Conversion and UX
Also called
colour contrast, contrast ratio
Level
Beginner
Affects
Readability, accessibility, click-through on buttons, visual hierarchy
Where to see it
Chrome and Firefox developer tools, Lighthouse accessibility audit, WebAIM contrast checker
In this article4
  1. How contrast works
  2. Why contrast matters
  3. Common mistakes with contrast
  4. How to act on it

How contrast works

Contrast is the difference in brightness between two colours that sit next to each other — usually text against its background, or a button against the block it sits in. Accessibility tools work it out from relative luminance, not from how different the hues feel. That is why a bright teal can fail against white while a dark grey passes: brightness does most of the work, not colour.

The Web Content Accessibility Guidelines set a minimum level for normal body text and a gentler one for large or bold text, and every modern browser inspector reports the measurement when you select an element. Contrast applies to more than words. A form field border, a focus outline, an icon that carries meaning and the edge of a card all need to be separable from whatever surrounds them.

Why contrast matters

The first reason is that people have to be able to read the page at all. Screens get used in daylight, on inexpensive phones with the brightness turned down to save battery, and by people whose eyesight is not what it was. In Nepal most traffic is mobile and a good deal of it happens outdoors, so a design that looks refined on a desktop monitor in an office can be genuinely unreadable in the street.

The second reason is attention. Every element on a page competes, and the eye goes to whatever stands out most from its surroundings. If a decorative band or a stock photo carries more contrast than the enquiry button, that is where attention lands. Contrast is one of the main levers behind visual hierarchy, which decides the order in which a page is read.

Common mistakes with contrast

Using a brand colour as a text colour is the usual one. Brand palettes are chosen for logos and large shapes, where a mid-tone reads perfectly well; the same colour set at body-text size on white often fails. Pale grey placeholder text inside form fields, outlined “ghost” buttons and captions laid over photographs fail for the same reason.

The other mistake is judging by eye on the machine the design was made on. A colour-managed laptop at full brightness in a dim room flatters everything. Hover, focus and disabled states are usually forgotten entirely, so a keyboard user cannot see where they are on the page.

How to act on it

Measure instead of guessing. The contrast checker built into Chrome and Firefox developer tools reports a reading for any element you select, and an accessibility audit lists every failure on a page in one pass. Fix body text and form labels first, then buttons and links, then icons and borders.

Then use contrast deliberately. Decide which single action matters most on the page, give it the strongest contrast available, and hold everything else back — secondary links, breadcrumbs, footer items. A page where every element shouts reads much like a page where nothing does, which is one of the first things I look at in conversion rate optimisation work.

Do and do not

Do

  • Measure contrast in developer tools rather than judging by eye
  • Give the main action the strongest contrast on the page
  • Check hover, focus and disabled states, not just default

Do not

  • Set body text in a mid-tone brand colour
  • Rely on pale placeholder text to label a field
  • Approve a design only on a bright desktop screen

Questions people ask about this

How do I know if my text has enough contrast?

Open the page in Chrome or Firefox, right-click the text and inspect it. The colour swatch in the styles panel reports the contrast measurement against whatever sits behind the text and tells you whether it meets the accessibility guidelines. A full accessibility audit in Lighthouse lists every failing element on the page at once, which is far quicker than checking elements one by one.

Does low contrast hurt my search rankings?

Not directly. Search engines do not demote a page for a pale colour choice. The effect is indirect: if people cannot read a page comfortably they leave sooner and act less often, and accessibility failures tend to travel alongside other quality problems. Treat contrast as a usability and compliance question first, and let any search benefit follow from that.

Can a pale or pastel brand still meet contrast requirements?

Yes. Keep the pastel for large shapes, background bands, borders and illustration, and use a darker version of the same hue for text and buttons. Most brand palettes already contain a deep tone for exactly this purpose. If yours does not, adding one darker shade usually clears nearly every failure without changing how the brand looks.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.