Color Contrast Checker
Normal text preview (16px)
The quick brown fox jumps over the lazy dog.
Large text preview (24px bold)
The quick brown fox jumps over the lazy dog.
Check WCAG AA/AAA contrast ratios for text and background colors | 100% Private
Normal text preview (16px)
The quick brown fox jumps over the lazy dog.
Large text preview (24px bold)
The quick brown fox jumps over the lazy dog.
Uses the official relative luminance and contrast ratio formulas from the WCAG 2.1 specification.
Pick colors visually or type exact hex codes — both stay in sync instantly.
Instantly see pass or fail for normal and large text at both WCAG conformance levels.
See exactly how your color combination looks in normal and large text sizes.
Instantly swap foreground and background colors to compare both directions.
All calculations happen in your browser — no colors are ever sent anywhere.
Low-contrast text is one of the most common accessibility failures on the web, making content difficult or impossible to read for users with low vision, color blindness, or anyone using a screen in bright light. This tool computes the exact WCAG 2.1 contrast ratio between your foreground and background colors and tells you whether it meets accessibility standards.
Each color is first converted to relative luminance by normalizing its R, G, and B channels to 0–1 and applying a gamma-correction curve. The contrast ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the luminance of the lighter color and L2 is the luminance of the darker color. This produces a value from 1:1 (no contrast) to 21:1 (maximum possible contrast, black on white).
WCAG AA is the widely adopted baseline standard, required by most accessibility laws and guidelines, requiring 4.5:1 for normal text and 3:1 for large text. WCAG AAA is a stricter, enhanced standard requiring 7:1 for normal text and 4.5:1 for large text, recommended for content aimed at users with more significant visual impairments.
The tool follows the official WCAG formula: each color's sRGB channels are converted to relative luminance, then the ratio (L1 + 0.05) / (L2 + 0.05) is computed, where L1 is the lighter color's luminance and L2 is the darker one. The result ranges from 1:1 (identical colors) to 21:1 (pure black on pure white).
For normal text, WCAG AA requires at least 4.5:1 and AAA requires at least 7:1. For large text (18pt+/14pt bold+), AA requires 3:1 and AAA requires 4.5:1.
Large text is defined as at least 18pt (24px) regular weight, or at least 14pt (18.66px) bold. Large text has lower contrast requirements because bigger, bolder strokes remain readable at lower contrast.
No. All luminance and contrast calculations happen locally in your browser with JavaScript. Nothing about your colors is transmitted or stored anywhere.
Black has the minimum possible relative luminance (0) and white has the maximum (1). Plugging these into the WCAG formula, (1 + 0.05) / (0 + 0.05), gives exactly 21, which is the maximum contrast ratio possible between any two colors.