PublicSoftTools

Color Contrast Checker — WCAG AA & AAA

Pick foreground and background colors to instantly check your contrast ratio against WCAG AA and AAA standards for normal text, large text, and UI components. Runs entirely in your browser — no signup required.

⏱ 9 min read · Complete guide below

The quick brown fox jumps over the lazy dog. (Normal text — 16px)

The quick brown fox jumps. (Large text — 24px bold)

Button label (UI component)

17.06contrast ratio
WCAG AANormal textPass
WCAG AALarge text (18pt+ or 14pt bold)Pass
WCAG AAUI components & graphicsPass
WCAG AAANormal textPass
WCAG AAALarge text (18pt+ or 14pt bold)Pass

How the Color Contrast Checker Works

  1. 1Click the color swatch to open the native color picker, or type a hex value directly into the input field (e.g. #1a1a2e).
  2. 2Set both foreground (text/icon colour) and background colours — use the swap button to quickly reverse them.
  3. 3The preview panel shows your colours applied to normal text, large text, and a UI button in real time.
  4. 4The results panel shows the contrast ratio and Pass/Fail for every WCAG AA and AAA criterion simultaneously.

WCAG Contrast Ratio Thresholds

The contrast ratio is calculated using the WCAG relative luminance formula — a weighted combination of linearised RGB values that models human perception of brightness. A ratio of 1:1 means identical colours; 21:1 is black on white. The thresholds below define what counts as accessible under the international standard.

Practical Tips for Meeting Contrast Requirements

Test at actual font size

The large text threshold (18px+ or 14px+ bold) applies to the rendered size, not the CSS value. A 14px bold font meets the large text definition; a 16px regular weight does not. Check the actual computed size in browser DevTools before applying the lower threshold.

Don't forget placeholder text

Placeholder text in form inputs is typically rendered at reduced opacity, which almost always fails AA. Style placeholder text at full opacity with a contrasting colour rather than using opacity reduction. It is frequently missed in accessibility audits.

Check focus indicators too

Keyboard focus outlines must also meet the 3:1 UI component threshold against the adjacent background. The default browser focus ring is often removed by CSS resets without a replacement — a common accessibility failure. Your focus indicator colour needs to pass the same contrast check as other UI components.

Disabled elements are exempt

WCAG explicitly exempts disabled UI components from contrast requirements — the standard acknowledges that disabled state intentionally communicates unavailability. However, consider using a visible "disabled" label or pattern rather than relying solely on low contrast, as users with cognitive disabilities may not interpret low contrast as "disabled."

Logos and decorative images are exempt

WCAG does not require logos, brand marks, or purely decorative images to meet contrast thresholds. Text within logos is also exempt. However, if a logo contains information (like a phone number or URL), that text does need to meet contrast requirements.

Aim for AAA on body copy

While AA (4.5:1) is the legal baseline, body text benefits significantly from AAA (7:1) contrast. The difference is visible to all users in suboptimal conditions — bright sunlight, ageing displays, or tired eyes. Black (#000) on white (#fff) achieves 21:1; dark grey (#1a1a2e) on white still exceeds 7:1.

The Complete Guide to Colour Contrast and Accessibility

Colour contrast is one of the most common and most fixable accessibility problems on the web. When text does not stand out enough from its background, it becomes hard or impossible to read for a large number of people — and unlike many accessibility issues, it can be checked and corrected with a single number. This guide explains who benefits from good contrast, how the ratio is actually calculated, why contrast alone is not enough, and the legal and business reasons it matters.

Who Benefits from Good Contrast

It is tempting to think of contrast as an edge case for a small group, but the reality is that it helps almost everyone in some situation. People with low vision — a group that grows with an ageing population — rely on strong contrast to distinguish letters. People with colour blindness, which affects roughly one in twelve men, may not perceive colour differences that seem obvious to others, so luminance contrast becomes their main cue.

Just as important is situational impairment, which affects people with perfect vision. Anyone reading a phone screen in bright sunlight, using a dimmed display to save battery, looking at a cheap or ageing monitor, or simply tired at the end of a long day benefits from higher contrast. Designing for sufficient contrast is therefore not a niche accommodation — it makes your interface more usable for your entire audience, which is why accessibility advocates describe it as a benefit that flows to everyone.

How the Contrast Ratio Is Calculated

The WCAG contrast ratio is not a simple comparison of colours — it is based on relative luminance, a measure of how bright each colour appears to the human eye. This matters because our eyes are far more sensitive to green than to blue or red, so the formula weights the colour channels accordingly (green counts for about 72% of perceived brightness, red about 21%, and blue just 7%). Each colour's red, green, and blue values are linearised and combined with those weights to produce a luminance value.

The ratio itself is then (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter colour's luminance and L2 the darker's. The result runs from 1:1 (two identical colours, no contrast at all) up to 21:1 (pure black on pure white, the maximum). WCAG's thresholds sit along this scale: 4.5:1 for normal text at the AA level, 3:1 for large text and UI components, and 7:1 for the enhanced AAA level. Because the formula models perception rather than raw colour difference, two colours that look distinct on a colour wheel can still fail if their brightnessis too similar — a common surprise that the checker instantly reveals.

Contrast Is Necessary but Not Sufficient

Passing a contrast check is essential, but it is only one piece of accessible colour use. The most important companion principle is to never rely on colour alone to convey information. A form that marks errors only by turning a field red is invisible to a colour-blind user; a chart that distinguishes lines only by colour is unreadable to many. The fix is to add a second cue — an icon, a text label, a pattern, or a shape — so the information survives even when the colour is not perceived.

It is also worth remembering that contrast is just one of dozens of accessibility requirements. WCAG Level AA also covers keyboard navigation, screen-reader compatibility, text alternatives for images, captions for video, and much more. Good contrast makes your content readable; it does not by itself make your site fully accessible. Think of the contrast checker as one important instrument on a larger dashboard, not a complete accessibility audit.

The Legal and Business Case

Beyond being the right thing to do, accessible contrast increasingly carries legal and commercial weight. In many jurisdictions, web accessibility is a legal requirement: the Americans with Disabilities Act has been the basis for a rising number of lawsuits over inaccessible websites, the European standard EN 301 549 references WCAG, and public-sector bodies in many countries must meet Level AA by law. Contrast failures are among the most frequently cited issues in accessibility complaints precisely because they are easy to detect.

The business case is just as real. An accessible site reaches a larger audience, tends to have cleaner and more legible design that benefits all users, and often correlates with better usability metrics and even SEO. Building contrast checking into your design process — testing colour pairs before they ship, watching out for the commonly missed cases like placeholder text and focus indicators, and aiming to exceed the AA minimum on body copy — is a small, cheap habit that prevents costly retrofits and makes your product usable by more people. Enter your foreground and background colours above, aim comfortably past the thresholds, and you will have covered one of the highest-impact accessibility bases.

Frequently Asked Questions

What is WCAG and why does contrast ratio matter?

WCAG (Web Content Accessibility Guidelines) is the international standard for web accessibility, published by the W3C. Contrast ratio defines how distinguishable foreground content (text, icons) is from its background. Users with low vision, colour blindness, or those viewing screens in bright sunlight rely on sufficient contrast to read content. WCAG sets minimum ratios to ensure interfaces are usable across a wide range of visual abilities.

What is the difference between WCAG AA and AAA?

AA is the standard compliance level required by most accessibility legislation (including WCAG 2.1 Level AA, ADA, and EN 301 549). It requires a 4.5:1 ratio for normal text and 3:1 for large text. AAA is the enhanced level, requiring 7:1 for normal text and 4.5:1 for large text. AAA is aspirational — not all content can meet it, and it is not legally required for most use cases. Aim for AA as a minimum; exceed it where possible.

What counts as "large text" for WCAG?

WCAG defines large text as 18pt (24px) or larger for regular weight text, or 14pt (approximately 18.67px) or larger for bold text. Large text has a lower contrast requirement (3:1 for AA, 4.5:1 for AAA) because it is inherently easier to read at lower contrast due to its size.

What contrast ratio is required for UI components and icons?

WCAG 2.1 Success Criterion 1.4.11 (Non-text Contrast) requires a minimum 3:1 contrast ratio for UI components — buttons, input borders, checkboxes, icons — against their adjacent colours. This applies to the visual boundaries that identify the component, not to decorative elements. The checker evaluates this against the same 3:1 threshold as large text.

How is the contrast ratio calculated?

The WCAG contrast ratio formula uses relative luminance. Each hex colour is converted to linearised sRGB values, then combined as: L = 0.2126R + 0.7152G + 0.0722B. The contrast ratio is (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter colour. The result ranges from 1:1 (identical colours) to 21:1 (black on white). All calculation is done in your browser — no data is sent to any server.

Does this tool check colour blindness or only contrast?

This tool checks luminance contrast ratio only, which is the WCAG-specified metric. It does not simulate colour blindness (deuteranopia, protanopia, etc.). Passing contrast ratio is necessary but not sufficient for full colour accessibility — you should also avoid using colour as the only means of conveying information. For colour blindness simulation, use a dedicated tool like Coblis.

Does passing WCAG AA mean my site is fully accessible?

No. Passing colour contrast is one requirement among many. WCAG 2.1 Level AA covers keyboard navigation, screen reader compatibility, text alternatives for images, caption for video, and dozens of other criteria. Contrast compliance is a necessary part of accessibility, not the whole of it.