Tools
Color Contrast Checker
Check color contrast ratios against WCAG 2.2 AA and AAA requirements with APCA scoring, color blindness simulation, and automatic fix suggestions.
About This Tool
Verify that your color combinations meet accessibility requirements using both WCAG 2.2 contrast ratio and the newer APCA (Accessible Perceptual Contrast Algorithm) metric. The tool also simulates how colors appear to people with different types of color vision deficiency and suggests fixes when contrast is insufficient.
Features
WCAG 2.2 contrast ratio — pass/fail for AA and AAA levels (text and non-text)
APCA Lc score — perceptual contrast from the WCAG 3.0 draft, with usage recommendations
Color blindness simulation — protanopia, deuteranopia, tritanopia, and achromatopsia previews with simulated contrast ratios
Auto-fix suggestions — when contrast fails, click a suggestion to apply the closest passing color
Non-text contrast — WCAG 2.2 SC 1.4.11 check for UI components and graphical objects (≥ 3:1)
Multi-format display — view and copy colors in HEX, RGB, and HSL
Live preview — see text at different sizes and UI components with your color pair
Shareable links — colors are encoded in the URL for easy sharing
CSS export — copy colors as CSS custom properties
What Are the WCAG 2.2 Contrast Requirements?
The Web Content Accessibility Guidelines (WCAG) 2.2 define four contrast thresholds based on text size and compliance level:
AA Normal Text — minimum 4.5:1 ratio. Applies to text smaller than 18pt (24px) or 14pt (18.66px) bold.
AA Large Text — minimum 3:1 ratio. For text 18pt+ (24px) or 14pt+ bold (18.66px).
AAA Normal Text — minimum 7:1 ratio (enhanced). Same size rules as AA.
AAA Large Text — minimum 4.5:1 ratio. Enhanced level for large text.
Non-Text (SC 1.4.11) — minimum 3:1 ratio. Applies to UI components (buttons, inputs, borders) and graphical objects that convey information.
APCA — The Next Generation
APCA (Accessible Perceptual Contrast Algorithm) is being developed for WCAG 3.0. Unlike WCAG 2.x which uses a simple luminance ratio, APCA accounts for human visual perception, including:
Polarity sensitivity — dark text on light backgrounds is perceived differently than light text on dark backgrounds
Font size awareness — the Lc value maps to recommended font sizes and weights
Spatial frequency — thin fonts need more contrast than bold fonts
APCA Lc value usage guidelines:
Lc ≥ 90 — Preferred for body text
Lc ≥ 75 — Good for body text, perfect for large text
Lc ≥ 60 — Large text and headings only
Lc ≥ 45 — Large non-text elements only
Lc ≥ 30 — Non-text elements (icons, borders, dividers)
Lc < 15 — Not usable for any purpose
Color Vision Deficiency
Approximately 8% of males and 0.5% of females have some form of color vision deficiency. The simulation uses Brettel/Viénot transformation matrices to show how your color pair appears to people with:
Protanopia (~1% of males) — missing red cone cells. Red appears dark, red-green differences are lost.
Deuteranopia (~1% of males) — missing green cone cells. The most common form. Green-red confusion.
Tritanopia (~0.003%) — missing blue cone cells. Blue and yellow are affected.
Achromatopsia (~0.003%) — complete color blindness. Only luminance differences are perceived.
Each simulation card shows the simulated contrast ratio so you can verify your colors work for all users.
How Do You Use It?
- Pick or type foreground (text) and background colors in HEX format
- View WCAG 2.2 and APCA scores, plus the visual contrast gauge
Check color blindness simulations — each card shows the perceived contrast ratio
If contrast fails, click a suggested fix to automatically apply the closest passing color
- Click RGB/HSL buttons to copy the color in that format
Use Copy CSS to export as custom properties or Share Link to share the URL with encoded colors
- Use the swap button to reverse foreground and background colors
Privacy
All contrast calculations happen entirely in your browser. No color data is transmitted to any server. The shareable link only encodes colors in the URL parameters.
Linux Command Reference
You can calculate contrast ratios from the terminal using Python or shell tools:
How Do You Calculate the WCAG Contrast Ratio?
How Do You Extract Dominant Colors from an Image?
How Do You Batch-Check Multiple Color Pairs?
Frequently asked questions
What is the minimum WCAG 2.2 contrast ratio for normal text?
Normal text needs at least 4.5:1 for AA and 7:1 for AAA. Large text (18pt+, or 14pt+ bold) only needs 3:1 for AA and 4.5:1 for AAA.
What's the difference between WCAG 2.2 contrast and APCA?
WCAG 2.x uses a simple luminance ratio, while APCA (planned for WCAG 3.0) models human perception, accounting for text polarity, font size, and weight. This tool reports both so you can compare them.
Does the contrast checker run in my browser?
Yes. All contrast calculations happen entirely client-side and no color data is sent to any server. Shareable links only encode the colors in the URL parameters.
Why check colors against color blindness simulations?
Roughly 8% of men and 0.5% of women have some color vision deficiency, so a pair that passes for typical vision may still fail for them. Each simulation card shows the perceived contrast ratio for protanopia, deuteranopia, tritanopia, and achromatopsia.
What does the non-text contrast (SC 1.4.11) check cover?
It applies the WCAG 2.2 minimum of 3:1 to UI components such as buttons, inputs, and borders, plus graphical objects that convey information "meaning".