Back Accessibility

WCAG Contrast Checker

Test any two colors against WCAG 2.1 AA and AAA in real time. Live preview, hex or color picker input, swap, and auto-suggest a passing variant when your pair fails. Free, no sign-up, browser-only.

Last updated: May 2026 · Reviewed by FreeDevTool accessibility engineering team
21.00:1
Contrast Ratio
The quick brown fox jumps over the lazy dog — sample text at 14px regular.
Large heading sample
Copied!

WCAG contrast in 2026 — the law, the math, and the patterns that pass

Web accessibility is no longer a moral nice-to-have. As of June 2025, the European Accessibility Act made WCAG 2.1 Level AA the minimum requirement for any digital product sold in the EU. The ADA Title III has carried similar weight in the US since the Robles v. Domino's settlement. Australia's DDA and Canada's AODA point at the same standard. The single most-checked WCAG criterion in compliance audits is 1.4.3 Contrast (Minimum) — the rule about color contrast. This guide walks through the math behind that rule, the thresholds you actually need to hit, the dark-mode and brand-color patterns that work in practice, and what the upcoming WCAG 3 / APCA shift will change.

The math, in plain English

WCAG 2.1 contrast is a ratio between the relative luminance of two colors. The four-step calculation:

  1. Convert each sRGB channel from 0–255 to a 0–1 float.
  2. Linearize: if the float is ≤ 0.03928, divide by 12.92; otherwise raise ((v + 0.055) / 1.055) to the 2.4 power. This undoes the gamma correction that displays apply.
  3. Combine with the luminance weights: L = 0.2126·R + 0.7152·G + 0.0722·B. The green channel weighs more because human eyes are most sensitive to mid-spectrum light.
  4. Add 0.05 to each color's luminance (the "Weber-Fechner" noise floor), then divide the larger by the smaller. The result is between 1:1 (no contrast) and 21:1 (pure black on pure white).

The 0.05 fudge factor exists because real screens have ambient reflectance — even pure black is not truly zero luminance. Without it, very dark colors would produce mathematically infinite contrast ratios that have no real-world meaning.

The thresholds — what each level demands

StandardNormal textLarge text (≥ 18pt or 14pt bold)UI components & graphics
WCAG 2.1 AA (legal floor)4.5 : 13 : 13 : 1 (criterion 1.4.11)
WCAG 2.1 AAA (aspirational)7 : 14.5 : 1

"Large text" in WCAG terms is 18pt or 24px regular, or 14pt or 19px bold. The thresholds drop because thicker strokes remain legible at lower contrast — but the visual angle matters more than the point size, so always verify on real devices and at user-zoom settings.

Where contrast applies — and where it does not

The exemptions are narrower than people assume. "Hover state" is not an exemption. "Marketing page" is not an exemption. "It's our brand color" is not an exemption.

The legal landscape — who actually enforces this

RegionLaw / regulationStandardEffective
EUEuropean Accessibility ActWCAG 2.1 AA via EN 301 549Mandatory June 2025
US (federal)Section 508 RefreshWCAG 2.0 AAMandatory January 2018
US (private sector)ADA Title III (case law)De-facto WCAG 2.1 AAActive litigation since ~2017
UKEquality Act + Public Sector Bodies RegulationsWCAG 2.1 AAMandatory September 2020 (public sector)
CanadaAccessible Canada Act + AODA (Ontario)WCAG 2.0 AATiered by org size, fully mandatory by 2025
AustraliaDDA + DTAWCAG 2.1 AAMandatory for federal government
JapanJIS X 8341-3Aligned with WCAG 2.1Required for public sector

Dark-mode contrast — not just "invert everything"

Inverting a light palette does not produce an accessible dark palette. Pure white text on pure black hits 21:1 but produces ghosting and halation for users with astigmatism. The well-tested dark-mode pattern:

Brand colors that do not pass — what to do

Every team eventually faces the conflict: marketing wants the brand teal at #3DD9D6, but it fails AA on white. Three patterns that work:

  1. Dual brand palette: one set for backgrounds and decoration, one set (slightly darker) for text. This is how Stripe, Vercel, Linear all handle it.
  2. Use the brand color on dark backgrounds. A bright teal that fails on white usually passes on near-black. Re-architect the layout so the brand color becomes a background, not text.
  3. Pair with text shadow / outline. WCAG does not specify how the contrast is achieved — a 1 px outline in the opposite color can rescue a borderline pair. Used sparingly, this works for marketing headers; do not rely on it for body text.

The APCA / WCAG 3 shift — what is changing

The luminance ratio formula has known weaknesses: it overrates very-bright yellows on white (which actually look low-contrast) and underrates dark navy on black (which actually reads well). APCA — the Accessible Perceptual Contrast Algorithm — corrects both. APCA produces a signed lightness contrast value (typically −108 to +106) and prescribes thresholds that vary with font weight and size, not a single 4.5:1 cliff.

As of May 2026, APCA is in candidate-recommendation status for WCAG 3 with no firm ratification timeline. Practical advice: hit WCAG 2.1 AA for legal compliance today. If you have headroom, also test with an APCA tool (apcacontrast.com) so your palette future-proofs.

Tooling beyond this checker

Best WCAG contrast checker for 2026 — what to compare

Search results for "color contrast checker" surface a dozen tools that look identical on the surface. They differ on three things that matter: whether they run client-side, whether they support the AAA threshold and 1.4.11 non-text contrast, and whether they suggest a passing variant when your pair fails. Here is how the most-used contrast tools compare in 2026:

ToolClient-sideAA + AAA + 1.4.11Auto-suggest fixAPCA previewCost
FreeDevTool WCAG Contrast CheckerYes (no upload)YesYes (HSL walk)RoadmapFree
WebAIM Contrast CheckerYesAA + AAA onlyManual lightness sliderSeparate toolFree
axe DevTools (Chrome extension)Local extensionYes (whole page)NoNoFree tier
Stark (Figma plugin)Inside FigmaYesYes (paid tier)Yes (paid)Freemium
Chrome DevTools Color PickerBuilt into browserAA + AAA hintClick "AA suggested"NoFree
Adobe Color AccessibilityCloud (uploads palette)AA onlyNoNoFree w/ Adobe ID

How do I check WCAG color contrast online without uploading my designs?

Every contrast check on this page runs in your browser using the W3C luminance formula — no color is sent to a server, no design file is uploaded, no account is required. Open the tool, paste any two hex codes (or use the native color picker), and the ratio updates as you type. The same is true of WebAIM's Contrast Checker, axe DevTools (which runs in your local Chrome), and Chrome DevTools' built-in color picker. Avoid tools that require uploading a Figma file or signing into a cloud workspace if you are checking unreleased brand colors or unannounced product designs.

What's the minimum color contrast ratio for ADA compliance?

The ADA itself does not specify a contrast number. US case law (Robles v. Domino's, Gil v. Winn-Dixie) treats WCAG 2.1 Level AA as the de-facto standard for ADA Title III compliance, which means 4.5:1 for normal text and 3:1 for large text (18pt regular or 14pt bold and above). Non-text UI components — form borders, focus rings, icon meaning — need 3:1 against adjacent colors under WCAG 1.4.11. Federal procurement (Section 508) references WCAG 2.0 AA, which has the same contrast numbers. If you ship to the EU, the European Accessibility Act enforces WCAG 2.1 AA via EN 301 549 as of June 2025 — the same 4.5:1 / 3:1 thresholds apply.

WCAG contrast checker alternative to WebAIM — 4 reasons people switched

WebAIM's Contrast Checker has been the canonical reference for over a decade, and it is excellent for what it does. The reasons developers move to alternative tools:

  1. Auto-suggest passing variant. WebAIM offers a manual lightness slider; this tool walks HSL lightness automatically until your pair crosses 4.5:1, then returns the nearest passing hex.
  2. 1.4.11 non-text contrast badge. Modern audits flag form borders, focus rings, and icon meaning under criterion 1.4.11. A dedicated 3:1 badge separates that check from the text thresholds.
  3. Live preview at both text sizes. Some pairs pass AA Large but fail AA Normal; rendering both sample sizes side-by-side surfaces the failure mode immediately.
  4. Copyable contrast report. One click copies a hex/hex/ratio block to the clipboard for design-system docs, tickets, or PR descriptions.

Pair the checker with the Color Palette Picker when designing accessible palettes from scratch, the Hex to RGB / HSL Converter for token math, and the in-depth WCAG 2.1 AA Implementation Guide for the wider compliance story.

Common contrast mistakes

Frequently Asked Questions

What is a WCAG contrast ratio?
A WCAG contrast ratio is a number between 1:1 (no contrast) and 21:1 (pure black on pure white) that measures how distinguishable two colors are. It is calculated from the relative luminance of each color using the formula (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter color. The higher the ratio, the more readable text becomes for users with low vision, color-blindness, aging eyes, or difficult viewing conditions like direct sunlight on a phone screen.
What are the WCAG AA and AAA thresholds?
WCAG 2.1 defines four main text thresholds: AA Normal requires at least 4.5:1; AA Large (18pt / 24px or 14pt / 19px bold and larger) requires 3:1; AAA Normal requires 7:1; and AAA Large requires 4.5:1. Non-text UI components (form borders, focus rings, icons) and graphical elements need at least 3:1 against adjacent colors under WCAG 1.4.11. Most accessibility laws — including the ADA, Section 508, and the EU EN 301 549 — reference the AA level as the minimum.
What counts as large text under WCAG?
Large text is defined as 18pt (24px) or larger for regular weight, or 14pt (19px) or larger when bold. The rationale is that thicker strokes and taller letterforms remain legible at lower contrast, so the threshold drops from 4.5:1 to 3:1. Note that pt and px conversions assume the default 96 DPI browser baseline — always confirm the rendered size on real devices, because CSS transforms, zoom, or user-agent stylesheets can change the perceived size.
Why does the auto-suggest change lightness, not hue?
Contrast depends on relative luminance, which is driven primarily by the lightness channel. Adjusting lightness preserves your brand hue while nudging the luminance just enough to pass AA. Shifting hue or saturation instead often produces surprising perceived color changes without reliably fixing the ratio — a slightly darker blue reads as the same blue, but a slightly more saturated blue can feel like a completely different brand color. The suggester walks the HSL lightness in small steps until the combination crosses the 4.5:1 AA Normal threshold.
Are contrast ratios the only accessibility check I need?
No — contrast is one of many WCAG success criteria. You also need visible focus indicators (WCAG 2.4.7 and 1.4.11), text resizable up to 200% without loss of content (1.4.4), no reliance on color alone to convey meaning (1.4.1), motion-reduction preferences respected (2.3.3), and proper semantic HTML with ARIA where native elements are insufficient. Use this tool as the first pass, then run a full audit with Axe DevTools, Lighthouse, or the W3C validator before shipping.
Does opacity affect contrast calculations?
Yes — when you use rgba() or opacity, the actual rendered color is the result of compositing the foreground over whatever is behind it. WCAG expects you to test the final rendered color pair. If you are evaluating a semi-transparent text color, first calculate the composited sRGB value against its true background, then feed that composited color into the checker. This tool assumes opaque input for simplicity; use the computed RGB from browser DevTools for translucent UI.
Will the upcoming WCAG 3 / APCA change these rules?
WCAG 3 introduces a new contrast model called APCA (Accessible Perceptual Contrast Algorithm) that reports a signed lightness-contrast value rather than a ratio. APCA accounts for font weight, size, and polarity (light-on-dark vs dark-on-light) more accurately than the luminance-ratio method. As of 2026, WCAG 2.1 / 2.2 ratio rules remain the legal standard in most jurisdictions. This tool implements the WCAG 2.x formula; expect a dedicated APCA checker once WCAG 3 is ratified.

Browse all 50 free developer tools

All tools run in your browser, no signup required, nothing sent to a server.