Color Contrast Checker
Check a text/background pair against WCAG 2.x AA and AAA contrast thresholds.
Colors
5.47:1 · normal textClosest: white
Contrast result
5.47:1 · AA pass · AAA failContrast ratio
About this tool
The Color Contrast Checker measures the ratio between a text color and its background and reports pass or fail against WCAG AA and AAA thresholds. Enter both colors with the hex inputs or pickers, and the ratio — from 1:1 for identical colors up to 21:1 for black on white — updates alongside level badges and a live sample paragraph rendered in the actual pair.
The maths is the WCAG relative-luminance method: each sRGB channel is linearized, weighted 0.2126, 0.7152 and 0.0722, and the lighter luminance plus 0.05 is divided by the darker plus 0.05. One ratio drives every verdict; the size context you select (normal, large, or UI components) only decides which thresholds apply.
Because the ratio compares luminance, it can approve pairs that look muddy to real eyes. WCAG 3's draft APCA model replaces it with perceptual Lc values — try the APCA Contrast Calculator when you need the newer metric — and the built-in protanopia, deuteranopia and tritanopia previews show how the pair survives deficient vision.
How to use this tool
Choose both colors
Type a hex value or use a picker for foreground and background; the nearest named color is shown.
Set the size context
Select normal text, large text, or UI components so the right thresholds apply.
Read the verdict
Weigh the ratio against the AA and AAA badges and the rendered sample text.
Refine or export
Swap the colors, try a random pair, then copy the analysis or export it as JSON.
WCAG thresholds this checker applies
| Content type | AA / AAA minimum |
|---|---|
| Normal text (below 18pt, or 14pt bold) | 4.5:1 / 7:1 |
| Large text (18pt+, or 14pt bold+) | 3:1 / 4.5:1 |
| UI components and graphical objects | 3:1 / 4.5:1 |
Success criteria 1.4.3 and 1.4.11; the UI Components preset follows the 3:1 non-text minimum.
Frequently asked questions
What contrast ratio does WCAG AA require?
Level AA needs 4.5:1 for normal text and 3:1 for large text; the same 3:1 minimum covers UI components and graphical-object boundaries under criterion 1.4.11.
What counts as large text?
At least 18pt (24px), or 14pt — about 18.7px — when bold. Anything smaller is judged against the stricter normal-text ratios.
Is APCA replacing the WCAG contrast ratio?
Not yet. APCA is the proposed method for WCAG 3, which remains a draft, while WCAG 2.2 keeps the luminance ratio this tool computes. Check both when a design sits near a threshold.
Do logos need to meet contrast requirements?
No. WCAG exempts logotypes from its text-contrast criteria, along with purely decorative or inactive elements. Text inside a logo image is likewise exempt, though keeping wordmarks legible is still good practice.
Related guides
Understanding WCAG Color Contrast (With Examples)
What WCAG color contrast ratios mean, the AA and AAA thresholds, how the ratio is computed from relative luminance, and how to fix text that fails accessibility checks.
HEX, RGB, HSL, and LCH: A Developer's Guide to CSS Colors
The four ways CSS lets you write a color, what each one is good at, and why HSL feels intuitive while LCH solves the gamut problems everyone trips over.
Related tools
APCA Contrast Calculator
Calculate directional APCA 0.1.9 Lc contrast scores and compare them with WCAG 2.1 ratios.
Color Blindness Simulator
Simulate color blindness on palettes and images. Compare protanopia, deuteranopia, tritanopia, and more side-by-side.
Palette Accessibility Checker
Check every color pair in your palette against WCAG AA/AAA contrast guidelines.
Color Converter
Convert colors between multiple formats (HEX, RGB, HSL, HSV, CMYK, LAB) with color blindness simulation, named colors, and batch processing