Contrast Checker

Check Color Accessibility with WCAG 2.1 & APCA

rgb(26, 26, 46) · hsl(240, 28%, 14%)
rgb(255, 255, 255) · hsl(0, 0%, 100%)
💎

Excellent contrast

Meets the highest AAA standard — excellent readability for everyone, including low vision.

17.06:1contrast ratioIndustry standard
✓ AA
Regular text — minimum for most websites
✓ AA Large
Headings & bold text — easier threshold
✓ AAA
Enhanced — best possible readability
✓ AAA Large
Enhanced for headings — gold standard
Lc 103.93

Perceptual contrast Next-gen (W3C draft)

✓ Body text
Readable at paragraph size — needs Lc ≥ 60
✓ Large text
Headlines & big UI — needs Lc ≥ 45
HeadingThe quick brown fox jumps over the lazy dog. This is body text at a normal reading size.
Fine print and captions at 12pxHyperlinkButtonFilled

Color Blindness Simulation

Normal Vision
Reference

Sample heading

Body text looks like this in this vision mode.

17.06:1
AA Pass
Protanopia
Red-blind · ~1.3%

Sample heading

Body text looks like this in this vision mode.

16.92:1
AA Pass
Deuteranopia
Green-blind · ~5%

Sample heading

Body text looks like this in this vision mode.

17.12:1
AA Pass
Tritanopia
Blue-blind · ~0.01%

Sample heading

Body text looks like this in this vision mode.

17.06:1
AA Pass

About the Contrast Checker

This contrast checker tests color pairs and full palettes against WCAG 2.1 accessibility standards and the APCA algorithm from the WCAG 3.0 draft. Enter two colors and get an instant verdict — plain language first, technical numbers second — along with a live text preview, dark mode toggle, color blindness simulation, and a palette audit matrix for up to 12 colors. All processing runs in your browser; no color data leaves your device.

Most contrast checkers stop at WCAG 2.1 ratios. This tool also computes the APCA (Accessible Perceptual Contrast Algorithm) Lightness Contrast value, which models how human vision perceives lightness differences between text and its background. APCA gives more accurate guidance for light text on dark backgrounds and for large display text, where WCAG 2.1 can be overly strict or lenient. Both scores are shown together so you can make informed decisions for your specific use case.

Key Features of the Contrast Checker

How Does Color Contrast Checking Work?

WCAG 2.1 defines contrast as the ratio of relative luminances between two colors. Relative luminance measures how bright a color appears after converting its sRGB values to a linear light scale and weighting the red, green, and blue channels according to human perception (green contributes most; blue least). The formula produces a ratio from 1:1 (no contrast) to 21:1 (black on white). A ratio of 4.5:1 or higher means normal body text meets the WCAG AA minimum.

APCA takes a different approach. Instead of a symmetric luminance ratio, it models how the human visual system perceives lightness differences between a text color and its background. The result is an Lc value ranging roughly from 0 to +/- 108. Positive values indicate dark text on a light background; negative values indicate light text on dark. This polarity matters: the same two colors produce different APCA scores depending on which is foreground and which is background. For dark mode interfaces, where WCAG 2.1 often over-penalizes bright text, APCA provides more accurate guidance.

How to Use the Contrast Checker

  1. Pick a foreground color using the color picker, or type a hex, RGB, or HSL value into the input field.
  2. Pick a background color the same way. Use the swap button to quickly reverse the pair.
  3. Read the verdict banner at the top — it shows a plain-language summary like "Great contrast!" before the ratio numbers.
  4. Review the WCAG 2.1 ratio and APCA Lc value. Expand "What is WCAG?" for plain-language explanations of each compliance level.
  5. If the pair fails AA, use the auto-fix buttons to adjust the foreground or background to the nearest passing color.
  6. To audit a full palette, expand the Palette Audit section. Add colors manually or use the import button to paste CSS variables, a Tailwind config, or a hex list.
  7. Click any cell in the matrix to load that color pair into the Quick Check panel for detailed analysis.
  8. In the Live Preview section, toggle between light and dark mode to verify contrast holds in both contexts.
  9. Open the Color Blindness Simulation to check distinguishability under protanopia, deuteranopia, and tritanopia.
  10. Export your results or copy the shareable URL to send to teammates.

Common Use Cases for Contrast Checking

Frequently Asked Questions

Is my data safe when using this contrast checker?

All calculations run entirely in your browser. No color values, palette data, or exported reports are sent to any server. You can confirm this by checking your browser's network tab while using the tool.

What is the difference between WCAG 2.1 and APCA contrast?

WCAG 2.1 uses a luminance ratio that treats foreground and background symmetrically — swapping the two colors produces the same score. APCA models human perception more accurately by accounting for which color is text and which is the surface behind it. This polarity means a bright color on dark and dark on bright can yield different APCA scores. APCA is especially useful for dark mode interfaces, where WCAG 2.1 can produce misleading results.

What contrast ratio do I need for WCAG AA compliance?

Normal text (under 18pt or 14pt bold) requires at least 4.5:1. Large text (18pt or larger, or 14pt bold) requires at least 3:1. WCAG AAA raises these to 7:1 and 4.5:1 respectively.

How do I test a full color palette for accessibility?

Expand the Palette Audit section and add your colors manually, or use the import button to paste CSS custom properties, a Tailwind config snippet, or a plain list of hex values. The tool builds an N×N matrix showing the WCAG result for every foreground/background combination. Click any cell to open that pair in the Quick Check panel.

Can I import colors from my CSS or Tailwind config?

Yes. The import dialog accepts CSS custom property blocks (--color-primary: #1a73e8;), Tailwind config color objects, and plain newline-separated hex values. Parsed colors are added to the palette immediately.

How accurate is the color blindness simulation?

The simulation uses established Brettel/Vienot color vision deficiency matrices to approximate how colors appear under protanopia, deuteranopia, and tritanopia. Delta E 2000 scores measure whether two colors remain perceptually distinguishable under each condition. No simulation perfectly replicates individual variation, but these models are widely used in accessibility research and professional design tools.

Related Tools