PublicSoftTools
Tools16 min read·PublicSoftTools Team·May 2026

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

  1. Open the colour contrast checker.
  2. Enter the foreground colour (text colour) as a hex code (e.g., #333333), RGB, or use the colour picker.
  3. Enter the background colour (e.g., #FFFFFF for white).
  4. 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.
  5. Adjust colours until you reach the required ratio for your use case.
  6. Use the suggested alternative colours feature to find the nearest accessible version of your chosen colour.

WCAG Contrast Requirements

StandardRequired ratioContextMandatory in UK?
WCAG 2.1 AA — Normal text4.5:1 minimum contrast ratioText under 18pt (24px) or 14pt (18.67px) boldYes for most websites serving the public (UK Equality Act, EU Web Accessibility Directive)
WCAG 2.1 AA — Large text3:1 minimum contrast ratioText 18pt+ (24px+) or 14pt+ bold (18.67px+ bold)Yes for most websites serving the public
WCAG 2.1 AA — UI components3:1 minimum contrast ratioNon-text elements: icons, borders of input fields, focus indicatorsYes
WCAG 2.1 AAA — Normal text7:1 minimum contrast ratioText under 18ptNo (AAA is optional enhanced standard)
WCAG 2.1 AAA — Large text4.5:1 minimum contrast ratioText 18pt+ or 14pt+ boldNo
WCAG 3.0 APCA (emerging)Lightness contrast (Lc) of 60–90 depending on font size and weightProposed replacement for WCAG 2.x contrast formula; not yet lawNo (emerging standard)

Common Contrast Failures in Web Design

Colour combinationRatioIssueFix
Grey text on white
#888888 on #FFFFFF
3.54:1Fails 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:1Common 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:1Invisible 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:1Fails 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:1Placeholder 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:1Reverse — 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:

  1. 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.
  2. Compute luminance: L = 0.2126R + 0.7152G + 0.0722B (these weights reflect human vision — green contributes most to perceived brightness, red next, blue least).
  3. 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:

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:

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