Color Contrast Analyzer

Color Contrast Analyzer

Check WCAG color contrast accessibility compliance. Extract colors from images. Analyze color palettes for web accessibility. Free color checker

WCAG contrast is the line between "looks fine" and "fails a legal accessibility audit". The minimum for normal text is 4.5:1 (AA) — and the surprising thing is how often a designer-approved color pair (a dark gray on light gray, soft brand colors) lands at 3.8:1 and locks you out of public-sector contracts. This analyzer computes WCAG 2.1 contrast ratios, the newer APCA score, and shows which AA/AAA tiers your color pair passes for normal, large, and UI-component text.

The contrast formula and what it measures

WCAG contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are the relative luminances of foreground and background (L1 ≥ L2). Luminance is a weighted sum of gamma-corrected RGB components — 0.2126·R + 0.7152·G + 0.0722·B — reflecting the eye's greater sensitivity to green. The +0.05 prevents division-by-zero at pure black.

The ratio ranges from 1:1 (identical colors, invisible) to 21:1 (pure black on pure white). All thresholds in WCAG are ratios on this scale. APCA — coming in WCAG 3 — uses a different, perceptually-uniform model that handles dark-mode contrast more accurately, but it is not yet normative.

The thresholds you need to memorize

  • AA — normal text (under 18pt or under 14pt bold): 4.5:1.
  • AA — large text (18pt+ or 14pt+ bold): 3:1.
  • AA — UI components, graphical objects, focus indicators: 3:1.
  • AAA — normal text: 7:1.
  • AAA — large text: 4.5:1.
  • Non-text content (logos, decorative): no requirement.

WCAG 2.2 (current) is the relevant baseline. Most public-sector procurement requires AA. AAA is recommended for healthcare, government services for vulnerable populations, and accessibility-first products.

Working example: a soft brand palette

Input

Foreground: #888888 (medium gray)
Background: #FFFFFF (white)

Output

Contrast ratio: 3.54:1

AA normal text:        FAIL (needs 4.5:1)
AA large text:         PASS (≥3:1)
AA UI / focus:         PASS (≥3:1)
AAA normal text:       FAIL (needs 7:1)
AAA large text:        FAIL (needs 4.5:1)

To pass AA normal text, darken foreground to #767676 (4.54:1) or darker.

A pure-gray placeholder text at #888 on white is one of the most common WCAG fails. Designers use it because it looks "subtle" but it locks out anyone with mild visual impairment. The fix is small (darken by 12 lightness points) and almost imperceptible visually.

When color contrast is not enough

  • Color blindness — about 8% of men have red-green color blindness. Two colors with the same luminance look identical to them regardless of hue. Pass contrast and also use shape, position, or text labels.
  • Low-vision / reduced contrast preferences — some users invert colors or boost contrast via OS settings. Your high-contrast UI may look extreme to them; respect prefers-contrast media query.
  • Glossy screens in daylight — even AA-passing combinations fade in direct sun. Mobile-first UIs are routinely viewed outdoors; bump to AAA where possible.
  • Anti-aliasing of small text — sub-pixel rendering reduces effective contrast at small sizes. Below 14px, prefer 5:1+ even if you technically pass AA at 4.5.

When to reach for this tool

  • You are reviewing a design system before launch and want to confirm every text-on-background combination passes AA.
  • You are auditing an existing site for an accessibility complaint or before a procurement bid that requires WCAG conformance.
  • You inherited a brand palette where the design lead picked harmonious but low-contrast colors, and you need numeric evidence to negotiate revisions.
  • You are picking a placeholder color or disabled-state color and want to know the lowest contrast that still passes UI-component requirements (3:1).

What this tool will not do

  • It will not measure contrast in images. WCAG applies to text and UI; for images of text (a screenshot of code, marketing visuals), evaluate the rendered text against the visible background and remember that compression artifacts can reduce effective contrast.
  • It will not assess contrast in motion (animations, video). Frames change too quickly for static analysis; for animations of important text, hold the frame for at least 5 seconds at AA contrast.
  • It will not check non-color accessibility issues — keyboard navigation, focus order, ARIA roles, alt text. Contrast is one component of WCAG conformance, not all of it.

Frequently asked questions

Is APCA going to replace WCAG 2.x contrast?

Eventually, yes — APCA is being incorporated into WCAG 3. For 2026, WCAG 2.2 (with the AA 4.5:1 / 3:1 thresholds) is the legally-enforced standard in EU EAA, US Section 508, and most procurement contracts. Design to WCAG 2.2 AA today; preview APCA for forward-compatibility.

What counts as "large text"?

18pt+ (24px+) regular weight, or 14pt+ (18.66px+) bold. The lower threshold (3:1 instead of 4.5:1) reflects that larger glyphs have more anti-aliasing room and are easier to read at reduced contrast.

Do I need to test contrast in both light and dark mode?

Yes. Dark mode has its own pitfalls — pure white text on pure black (21:1) is too high for many users with astigmatism (visual smearing). Aim for 4.5:1 to 7:1 in dark mode, not 21:1.

Are focus rings subject to contrast requirements?

Yes — WCAG 2.1 SC 1.4.11 (AA) requires UI component indicators (including focus) to contrast 3:1 with adjacent colors. WCAG 2.2 added SC 2.4.11 with specific focus appearance requirements.

My logo fails contrast. Do I need to redesign?

WCAG 2.1 exempts logos and brand names from contrast requirements (SC 1.4.3). However, any text-information in or around the logo (tagline, alt text alternative) still applies. Brand mark itself: exempt.

Does this tool support alpha (transparency) in foreground colors?

Partial — alpha foreground over an opaque background is computed by blending FG with BG using the alpha value, then comparing the result. For complex stacking (alpha FG over alpha BG over an image), there is no general answer; flatten the layers in your design tool first.

Related tools

Last updated · E-Utils editorial team