Contrast Ratio Calculator
By using our calculators, you agree to our Terms of Use.
WCAG contrast ratio between foreground and background HEX colors — AA and AAA thresholds.
Two colors
Contrast ratio
12.63:1
Passes WCAG AA normal text
- AA normal (4.5:1)
- Pass
- AA large (3:1)
- Pass
- AAA normal (7:1)
- Pass
Related calculators
WCAG contrast ratio
Contrast ratio measures how distinguishable text is from its background — from 1:1 (identical) to 21:1 (black on white). WCAG 2.x requires at least 4.5:1 for normal text (AA) and 7:1 for enhanced (AAA). Large text (18pt+ or 14pt bold) needs 3:1 for AA.
The formula uses relative luminance of sRGB colors — not hue or saturation alone. Light gray on white fails quickly; dark blue on white often passes easily.
Example: #767676 text on #FFFFFF ≈ 4.54:1 — barely passes AA for normal text. #000000 on #FFFFFF = 21:1.
Common questions
What passes WCAG AA?
Normal text: 4.5:1 or higher. Large text: 3:1. Non-text UI components and graphics: 3:1 against adjacent colors.
Is this a legal compliance guarantee?
No. This is a math check for sRGB hex pairs. Full accessibility audits include font size, focus states, and non-color cues.