Skip to content

Color Contrast Checker

Calculate opaque sRGB contrast using WCAG 2.2, inspect both relative luminance values, and check the requirements that apply to text and interface components.

Contrast preview and calculated ratio

Normal text at 16 CSS pixels

Large text at 24 CSS pixels

Large bold text at about 18.67 CSS pixels

Example UI boundary

Contrast ratio

6.288:1

Foreground luminance

1.000000

Background luminance

0.116997

Colors to compare

#FFFFFF

Examples: #1D4ED8, rgb(29, 78, 216), or navy.

#4F46E5

Examples: #1D4ED8, rgb(29, 78, 216), or navy.

WCAG 2.2 results

Pass/fail uses the unrounded ratio. Large text means at least 18pt (24 CSS px) regular, or 14pt (about 18.67 CSS px) bold. Font characteristics still affect readability.

Normal text — Level AA

WCAG Success Criterion 1.4.3

Pass · 4.5:1

Normal text — Level AAA

WCAG Success Criterion 1.4.6

Fail · 7:1

Large text — Level AA

At least 18pt regular or 14pt bold

Pass · 3:1

Large text — Level AAA

At least 18pt regular or 14pt bold

Pass · 4.5:1

Non-text UI and graphics — Level AA

Required visual boundaries, states, and meaningful graphical objects

Pass · 3:1

Hue-preserving foreground alternatives

Suggestions adjust OKLCH lightness, reduce chroma only when needed for sRGB, then quantize and recheck the displayed color against the selected ratio.

The current pair already meets the selected 4.5:1 target, so no adjustment is needed.

Standard, method, and limits

The calculation follows WCAG 2.2 relative luminance and contrast. Read the W3C explanations for minimum text contrast (1.4.3), enhanced text contrast (1.4.6), and non-text contrast (1.4.11).

This checker evaluates two opaque, flat sRGB colors. It does not resolve transparency, gradients, text over images, font rendering, focus-state completeness, or whether color alone communicates meaning. Automated contrast is one accessibility check, not proof of WCAG conformance or legal compliance; test the rendered interface with people and assistive technology.

Frequently Asked Questions about Color Contrast Checker

WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios for text legibility. Level AA requires 4.5:1 for normal text and 3:1 for large text. Level AAA requires 7:1 and 4.5:1 respectively.