contrast-checker

/// COLOUR

Contrast Checker

Enter a foreground and background colour and see the contrast ratio, with a pass or fail against WCAG 2.1 AA and AAA for both normal text, large text, and UI components.

Runs locally. No data sent anywhere.

Presets:

Calculated WCAG 2.1 Contrast Ratio

20.17
Passes all WCAG 2.1 AA and AAA criteria

Live Visual Preview

Large Heading Text (24px / 18pt)

This paragraph demonstrates body copy legibility. WCAG AA requires at least 4.5:1 for regular text below 18pt (or bold below 14pt). High contrast prevents fatigue and ensures accessibility in bright sunlight or low-contrast screens.

Form Input Field

WCAG 2.1 Criteria Matrix

Includes AA & AAA standards
Normal TextLevel AA

Body copy & small text (< 18pt or < 14pt bold)

Target: 4.5:1PASS
Normal Text EnhancedLevel AAA

Optimal legibility for small & fine print

Target: 7.0:1PASS
Large TextLevel AA

Headings (≥ 18pt / 24px, or ≥ 14pt / 18.5px bold)

Target: 3.0:1PASS
Large Text EnhancedLevel AAA

High-contrast headings & titles

Target: 4.5:1PASS
UI Components & Graphical ObjectsLevel AA

Form boundaries, button outlines & essential icons

Target: 3.0:1PASS

// Standards-Compliant Relative Luminance:

Luminance is calculated using the official W3C formula: sRGB channels are linearized via C ≤ 0.04045 ? C / 12.92 : ((C + 0.055) / 1.055)^2.4, weighted as 0.2126 R + 0.7152 G + 0.0722 B, and evaluated via (L1 + 0.05) / (L2 + 0.05).

// Runs entirely in your browser. Nothing is uploaded, nothing is stored, and it keeps working with the network off.