DEVELOPER PRECISION ENGINE

Color Contrast Checker (WCAG)

Check if your color combinations meet WCAG 2.1 accessibility contrast ratios.

Sample Text

The quick brown fox jumps over the lazy dog.

12.63:1

Contrast Ratio

AAA
AA Normal Text
4.5:1
AA Large Text
3:1
AAA Normal Text
7:1
AAA Large Text
4.5:1

How to Use This Tool

1

Enter foreground text color in hex format.

Enter foreground text color in hex format.

2

Enter background color in hex format.

Enter background color in hex format.

Pro Tip

Don't just check your primary text color — placeholder text, disabled button states, and secondary or muted text colors are the most common contrast failures found in an accessibility audit, precisely because designers intentionally lighten them for visual hierarchy without rechecking the resulting ratio against the actual WCAG threshold that still legally applies to them. Icon-only buttons and form field borders deserve the same scrutiny as text, since WCAG's separate 3:1 non-text contrast requirement for UI components is just as frequently overlooked as the text requirement itself, despite showing up in the same automated audit tools that flag text contrast failures and being just as easy to fix once identified. It's also worth testing text on top of a gradient or an image background at both its lightest and darkest points, not just an average sample — a contrast ratio that passes comfortably over a solid color background can fail badly wherever a gradient dips into a lighter or more saturated region, so check the worst-case point rather than only the average.

About This Tool

When to Use

  • Checking a button's text color against its background before shipping a new component to a shared design system library
  • Verifying a website meets WCAG AA contrast requirements ahead of a legally mandated accessibility audit or procurement review
  • Testing whether a brand's exact primary color works reliably as body text on a white background or genuinely needs darkening

Key Details

A WCAG color contrast checker calculates the exact contrast ratio between a foreground and background color and reports whether it meets WCAG 2.1's AA (4.5:1 normal text, 3:1 large text) or AAA (7:1 n...

Worked example

Checking white text (#FFFFFF) on a medium blue background (#3B82F6) returns a contrast ratio of roughly 3.68:1 — this passes WCAG AA for large text (18pt+ or 14pt+ bold) at the 3:1 threshold, but fails AA for normal body text, which requires 4.5:1, meaning that exact pairing needs a noticeably darker blue before it's usable for regular-sized paragraph text. Swapping the background to a deeper navy like #1E3A8A instead pushes the ratio up past 7:1, comfortably clearing even the stricter AAA threshold for normal body text. A third test using a mid-gray background around #6B7280 would fall somewhere between those two extremes, illustrating why the exact background shade matters as much as the text color itself when tuning a palette for accessibility.

Color Contrast Checker (WCAG) FAQ

What is WCAG color contrast?

WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios between text and background colors to ensure readability for people with visual impairments, including color blindness and low vision. WCAG 2.1 AA is the legal standard in many jurisdictions.

What are the WCAG 2.1 contrast requirements?

AA requires 4.5:1 for normal text and 3:1 for large text (≥18pt or ≥14pt bold). AAA requires 7:1 for normal text and 4.5:1 for large text. This tool checks all four thresholds — confirmed via testing against known reference colors, including the widely-cited #767676-on-white case that sits right at the AA boundary — and shows exactly which standards your color combination meets or fails.

What is the contrast ratio formula?

The WCAG formula calculates relative luminance (L) for each color: L = 0.2126R + 0.7152G + 0.0722B, where each channel is linearized from sRGB. The ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color. A ratio of 21:1 = black on white, 1:1 = same color.

How do I fix a failing contrast ratio?

Darken the foreground or lighten the background (or vice versa). This tool includes a suggestion feature that finds nearby colors that pass the required ratio. For text on a colored background, try: using a darker text color, adding a subtle background tint, or increasing font weight/size.

Does color contrast matter for non-text elements?

Yes. WCAG 2.1 requires a 3:1 contrast ratio for user interface components (buttons, form fields) and graphical objects (icons, charts). This tool focuses on text contrast, but the same principles apply to UI elements.

What's the difference between WCAG AA and AAA?

AA is the minimum legal standard required in most jurisdictions (ADA, EAA). AAA is a higher, voluntary target. AA requires 4.5:1 contrast for normal text and 3:1 for large text (≥18pt or ≥14pt bold). AAA requires 7:1 for normal text and 4.5:1 for large text. Most websites aim for AA compliance with AAA for key content areas like body text and navigation.

Master Your Entire Toolkit

Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.

Built and reviewed by the Toolzip Team · Based on W3C WCAG 2.1 — Contrast Minimum and W3C Understanding WCAG — Contrast Ratio