Colour Contrast Checker — WCAG Accessibility Tool
Colour contrast is one of the most common web accessibility failures — and one of the easiest to fix before deployment. Low contrast text causes real problems for the 8% of men with colour blindness, users with low vision, and anyone reading on a screen in bright sunlight. The free colour contrast checker on PublicSoftTools calculates the WCAG contrast ratio for any two colours and shows pass/fail status for AA and AAA accessibility standards.
How to Use the Colour Contrast Checker
- Open the colour contrast checker.
- Enter the foreground colour (text colour) as a hex code (e.g., #333333), RGB, or use the colour picker.
- Enter the background colour (e.g., #FFFFFF for white).
- The checker instantly shows: contrast ratio (e.g., 7:1), and pass/fail for WCAG AA (normal text, large text, UI components) and AAA levels.
- Adjust colours until you reach the required ratio for your use case.
- Use the suggested alternative colours feature to find the nearest accessible version of your chosen colour.
WCAG Contrast Requirements
| Standard | Required ratio | Context | Mandatory in UK? |
|---|---|---|---|
| WCAG 2.1 AA — Normal text | 4.5:1 minimum contrast ratio | Text under 18pt (24px) or 14pt (18.67px) bold | Yes for most websites serving the public (UK Equality Act, EU Web Accessibility Directive) |
| WCAG 2.1 AA — Large text | 3:1 minimum contrast ratio | Text 18pt+ (24px+) or 14pt+ bold (18.67px+ bold) | Yes for most websites serving the public |
| WCAG 2.1 AA — UI components | 3:1 minimum contrast ratio | Non-text elements: icons, borders of input fields, focus indicators | Yes |
| WCAG 2.1 AAA — Normal text | 7:1 minimum contrast ratio | Text under 18pt | No (AAA is optional enhanced standard) |
| WCAG 2.1 AAA — Large text | 4.5:1 minimum contrast ratio | Text 18pt+ or 14pt+ bold | No |
| WCAG 3.0 APCA (emerging) | Lightness contrast (Lc) of 60–90 depending on font size and weight | Proposed replacement for WCAG 2.x contrast formula; not yet law | No (emerging standard) |
Common Contrast Failures in Web Design
| Colour combination | Ratio | Issue | Fix |
|---|---|---|---|
| Grey text on white #888888 on #FFFFFF | 3.54:1 | Fails WCAG AA for normal text (needs 4.5:1). Extremely common in modern flat design. | Darken text to #767676 or darker for 4.5:1 minimum on white; use #595959 for comfortable reading |
| Light blue on white #4A90E2 on #FFFFFF | 2.89:1 | Common link colour that fails WCAG AA. Light blues look fine to many users but fail contrast standards. | Use a darker blue (#0054A6 gives 7:1 on white); or use underline as additional differentiator for links |
| Yellow text on white #FFFF00 on #FFFFFF | 1.07:1 | Invisible on white. Despite being highly visible on dark backgrounds, yellow is unreadable on white. | Never use yellow text on light backgrounds; yellow is a background colour, not a text colour on white |
| White on light blue #FFFFFF on #4A90E2 | 2.89:1 | Fails WCAG AA. Light buttons with white text — very common design pattern that fails accessibility. | Use dark text (#000 or #333) on light blue, or use a darker blue background with white text |
| Grey placeholder text #AAAAAA on #FFFFFF | 2.32:1 | Placeholder text in form inputs often fails contrast — by design in many UI libraries. | Minimum #767676 on white for AA compliance; consider making placeholder text darker than typical convention |
| Dark text on dark blue #333333 on #1A237E | 1.94:1 | Reverse — dark text on dark background. Appears sophisticated but nearly unreadable. | Use white or very light text (#EEEEEE or white) on dark blue backgrounds |
How the Contrast Ratio Is Calculated
The WCAG contrast ratio uses relative luminance — not just perceived brightness:
- Convert RGB to relative luminance: Each RGB component (0–255) is divided by 255 to get a 0–1 value, then linearised using a gamma correction formula: values ≤ 0.04045 are divided by 12.92; values above are computed as ((value + 0.055) / 1.055) ^ 2.4.
- Compute luminance: L = 0.2126R + 0.7152G + 0.0722B (these weights reflect human vision — green contributes most to perceived brightness, red next, blue least).
- Compute ratio: Contrast = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter colour and L2 the darker. The ratio ranges from 1:1 (no contrast — same colour) to 21:1 (maximum — pure black on pure white).
This formula means equal RGB differences do not produce equal contrast differences — dark-on-dark has very different characteristics to light-on-light. Two colours that look similar to a person with normal vision may have very different effects on users with low vision or colour blindness.
Contrast and Colour Blindness
Colour contrast requirements exist separately from colour blindness considerations, but overlap significantly:
- Deuteranopia (most common): Reduced sensitivity to green. Red-green distinction is impaired. ~6% of men.
- Protanopia: Reduced sensitivity to red. Red appears much darker. ~2% of men.
- Tritanopia: Blue-yellow confusion. Rare (~0.01% of population).
- Achromatopsia: Complete colour blindness; relies entirely on luminance contrast. Rare but important for worst-case design.
Sufficient luminance contrast (not just colour difference) is accessible to all forms of colour blindness — because luminance is perceived regardless of which colour receptors are functioning. This is why the WCAG formula uses luminance, not colour difference: a 4.5:1 contrast ratio is accessible to users with colour blindness even if the colours themselves look different to them.
Legal Requirements for Accessibility in the UK
Web accessibility is a legal requirement for many organisations in the UK:
- Public sector: The Public Sector Bodies (Websites and Mobile Applications) Accessibility Regulations 2018 require WCAG 2.1 AA compliance for all UK public sector websites and apps. Exemptions are narrow; enforcement is via the Equality and Human Rights Commission.
- Private sector: The Equality Act 2010 requires "reasonable adjustments" for disabled users. Inaccessible websites have been subject to legal challenges in the UK and EU. WCAG 2.1 AA is accepted as the standard of reasonable adjustment for digital services.
- EU: The European Accessibility Act (EAA) requires WCAG 2.1 AA for many private sector digital services from June 2025. UK businesses serving EU customers are affected.
- WCAG 2.2: Published in October 2023; adds requirements for focus visibility and drag-and-drop alternatives. The UK government has published guidance recommending 2.2 compliance.
Common Questions
What counts as "large text" for the 3:1 ratio?
WCAG defines large text as: 18 point (24px) or larger in regular weight, or 14 point (18.67px) or larger in bold weight. Note that CSS px values do not always map 1:1 to pt values depending on user settings and display. The practical threshold: heading text at 24px+ gets the 3:1 requirement; body text at 16–20px gets the 4.5:1 requirement. When in doubt, use 4.5:1 for any text that might be displayed at body text size.
Does this apply to images of text?
Yes — WCAG 1.4.3 applies to images of text as well as live text. Images containing text (infographics, screenshots with text overlays, decorative text images) must meet the same contrast requirements. The exception: logotypes (the brand name as a logo) are exempt from contrast requirements. However, alternative text for images containing important text must be provided regardless.
Our brand colours fail contrast — do we have to change them?
Not necessarily — you need to use them in accessible combinations. A light brand colour that fails as a text colour may work fine as a background with dark text. A dark brand colour works as text on light backgrounds. Most accessibility issues arise not from brand colours themselves but from combinations chosen without checking contrast. Using your brand colour as an accent colour (borders, icons, highlights) at 3:1 contrast, with sufficient-contrast dark text as the primary content colour, typically satisfies requirements without changing brand colours.
Check Colour Contrast
Enter any two colours to get the WCAG contrast ratio and instant pass/fail results for AA and AAA accessibility standards. Free, instant.
Open Colour Contrast Checker