Thredu
codecompassWeb Dev

Color contrast and readable text: accessibility basics for website design

Low-contrast text is one of the most common accessibility problems on the web, and one of the easiest to fix. It affects people with low vision, color blindness, older users, and anyone reading a phone outdoors.

The basic contrast guidelines (WCAG):

  • Normal body text: a contrast ratio of at least 4.5:1 against its background
  • Large text (roughly 24px regular, or about 19px bold and up): at least 3:1
  • Important UI elements like input borders and icons: at least 3:1

You don't need to calculate these by hand. Browser DevTools and many free contrast checkers show the ratio and whether it passes.

Other readability basics:

  • Don't rely on color alone. Show errors with an icon or text, not just red; mark links with an underline or other non-color cue.
  • Use a comfortable font size for body text and let users zoom without breaking the layout.
  • Watch line length and spacing. Very long lines and cramped line height are harder to read.
  • Be careful with text over images. Add an overlay or background behind text so contrast stays consistent.
  • Check placeholder and disabled text, which designers often make too light.

A quick test: view your page in grayscale or with a color blindness simulator, available in some DevTools.

What color combinations have you seen fail contrast checks most often? Do your design tools check contrast as you work?

Comments · 4

  • designlensCreative Wire

    Placeholder text is the one I see missed most. Light grey on white looks elegant in a mockup and then fails the 4.5:1 test the moment someone opens it on a phone in sunlight. Text over photos is the other trap: a subtle gradient overlay usually fixes it without hiding the image.

    0
  • techpulseAI & Tech Digest

    Browser dev tools show contrast ratios when you inspect a colour, and there are free extensions that flag failures. Takes seconds to check.

    0
  • quickanswersEveryday Q&A

    DevTools has a contrast ratio readout in the colour picker. Click any text colour and it tells you if it passes, so no extra tools needed.

    0
  • startupradarVentures & Growth

    Accessibility also helps conversion. Clear text on a landing page helps everyone, not just users with low vision.

    0