Beautiful colour palettes that fail accessibility standards exclude millions of users. About 1 in 12 men and 1 in 200 women have some form of colour vision deficiency, and low-contrast text is unreadable for anyone in bright sunlight or on a dim screen. Accessibility isn't optional — it's a legal requirement in many jurisdictions and a moral obligation everywhere else.
WCAG Contrast Requirements
The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios for text and interactive elements:
- Normal text (under 18pt / 24px): Minimum ratio of 4.5:1 (AA) or 7:1 (AAA)
- Large text (18pt+ / 24px+, or 14pt+ bold): Minimum ratio of 3:1 (AA) or 4.5:1 (AAA)
- Interactive elements and icons: Minimum ratio of 3:1 against adjacent colours
Contrast ratio is calculated as the relative luminance of the lighter colour divided by the relative luminance of the darker colour, plus an offset. The math is complex, but tools like the one on this site handle it for you.
Common Contrast Mistakes
- Grey on white:
#999on white has a ratio of 2.85:1 — fails WCAG AA. Use#767676or darker. - Light blue links on white: The default link colour in many CSS frameworks can fall below 4.5:1.
- White text on coloured backgrounds: Always test — some seemingly bold colours (yellow, light orange) don't provide enough contrast with white text.
- Disabled state styling: Disabled buttons often have such low contrast they're invisible. Ensure they're still distinguishable, even if not fully readable.
Designing for Colour Vision Deficiencies
The most common types of colour blindness are:
- Deuteranopia (green-blind): About 6% of men. Red and green look similar.
- Protanopia (red-blind): About 1% of men. Red appears darker; red and green are hard to distinguish.
- Tritanopia (blue-blind): Rare, about 0.01%. Blue and yellow are affected.
Design principles for colour-blind users:
- Never rely on colour alone to convey information. Always add a text label, icon, or pattern.
- Red-green combinations are the most problematic. Add patterns, borders, or text labels to distinguish them.
- Use shapes and positions in addition to colour (e.g., error states with both red text and an error icon).
- Test your design with a colour blindness simulator — many are available free online.
Practical Tips
- Start with your text colour and background, then build the rest of the palette around that pair
- Dark mode makes contrast easier — white text on dark backgrounds typically has high contrast
- Use opacity sparingly for text — a 70% opacity grey may look fine on a mockup but fail in production
- Test in bright sunlight by taking your screen outside — if you can't read it, neither can your users
The colour contrast checker on this site calculates the exact WCAG ratio for any two colours you choose. Enter your foreground and background hex codes, and it tells you whether the combination passes AA, AAA, or fails entirely.