Color Contrast Checker (WCAG AA & AAA)

Test whether your text and background colours are readable and meet WCAG 2.2 accessibility standards. Enter two colours to see the contrast ratio, pass/fail results for AA and AAA (normal text, large text and UI components) and a live preview. If a pair fails, the checker suggests the closest colours that pass, keeping your brand hue.

  • 100% free
  • No sign-up
  • Private & local
  • Works on mobile
Try:

★ Button / icon

Private by design: every calculation runs locally in your browser. Nothing you type is sent to a server or stored by us.

What Is a Colour Contrast Checker?

A colour contrast checker measures how distinguishable two colours are, usually text against its background, and tests the result against the Web Content Accessibility Guidelines (WCAG). Low-contrast text, like light grey on white or white on yellow, is hard to read for the roughly 1 in 12 men and 1 in 200 women with colour vision deficiency, for older people with reduced contrast sensitivity, for anyone with low vision, and for everyone reading on a phone in bright sunlight.

Meeting WCAG contrast is also a legal requirement in many places. The European Accessibility Act (in force from June 2025), the ADA and Section 508 in the United States, the UK Public Sector Bodies Accessibility Regulations and EN 301 549 all reference WCAG level AA. This checker gives you an instant, standards-based answer, and suggests fixes when a colour pair fails.

How to Use the Contrast Checker

  1. Enter the text colour and background colour in any format (HEX, RGB, HSL or colour names), or use the pickers.
  2. Read the contrast ratio, from 1:1 (identical) to 21:1 (black on white).
  3. Check each WCAG criterion: AA and AAA for normal and large text, plus non-text UI components.
  4. Look at the live preview with your own sample text.
  5. If it fails, click "Use this" on a suggested colour. The suggestions keep your hue and saturation and only change the lightness as little as possible.

WCAG Contrast Requirements

LevelNormal textLarge textUI components
AA (minimum, legally required in most places)4.5:13:13:1
AAA (enhanced)7:14.5:1—

Large text means at least 18 point (24 CSS pixels) regular, or 14 point (about 18.66 px) bold. UI components and graphical objects (WCAG 1.4.11) cover form field borders, icons, focus indicators, chart lines and toggle states. Logos and purely decorative elements are exempt, and so is disabled (inactive) UI text.

How the Contrast Ratio Is Calculated

WCAG uses relative luminance, the perceived brightness of a colour. Each sRGB channel is divided by 255 and linearised (values up to 0.04045 are divided by 12.92; larger ones become ((v + 0.055)/1.055)2.4). Then L = 0.2126R + 0.7152G + 0.0722B, reflecting the eye's greater sensitivity to green. The ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter colour. Results are not rounded up: 4.49:1 fails AA, so this tool truncates rather than rounds.

Common Contrast Mistakes

  • Light grey body text: #999999 on white is only 2.85:1. The lightest grey that passes AA on white is #767676 (4.54:1).
  • White text on brand orange or yellow: bright, warm colours are light in luminance, so white text usually fails. Use dark text, or darken the brand colour for buttons.
  • Placeholder text: it still needs 4.5:1 if it conveys information.
  • Text over images: check against the lightest part of the image, or add a dark overlay.
  • Transparent colours: rgba text is blended with its background first. This checker does that automatically.

Beyond the Numbers

WCAG 2's formula is the legal standard, but it isn't perfect. It can overrate some dark-on-dark pairs and underrate white text on mid-tone colours. The upcoming APCA method in WCAG 3 aims to fix this, so treat a borderline pass with caution and test with real users. Font weight and size matter too: thin fonts need more contrast than their size suggests. Never rely on colour alone to convey meaning (WCAG 1.4.1). Add icons, underlines or text labels for links, errors and status.

Features

  • WCAG 2.2 AA and AAANormal text, large text and UI components.
  • Accurate ratioTruncated, never rounded up.
  • Live previewWith your own sample text.
  • TransparencyRGBA and 8-digit hex are blended correctly.
  • Smart suggestionsThe closest passing colours, keeping your hue.
  • Any colour formatHEX, RGB, HSL and names.

Frequently Asked Questions

What contrast ratio do I need?

At least 4.5:1 for normal text and 3:1 for large text and UI elements (WCAG AA). Aim for 7:1 for AAA.

What is the highest possible contrast?

21:1, black (#000000) on white (#FFFFFF).

Is WCAG AAA required by law?

Generally no. Laws and procurement standards reference AA. AAA is recommended where possible, especially for long reading.

Does contrast apply to logos?

No. Text that is part of a logo or brand name has no contrast requirement.

Why does white on orange fail?

Orange has a high luminance, close to white, so the ratio is low even though the colours look very different.