Free WCAG Color Contrast Checker
Check whether two colors meet WCAG AA and AAA contrast standards for accessibility. Live preview at multiple text sizes with automatic suggestions when contrast is too low.
Large heading text
Medium body text (18px) for reading and content.
Normal body text (16px) for paragraphs.
Small body text (14px) for captions and metadata.
Contrast ratio
Requires 4.5:1 Β· You have 14.63:1
Requires 3.0:1 Β· You have 14.63:1
Requires 7.0:1 Β· You have 14.63:1
Requires 4.5:1 Β· You have 14.63:1
Requires 3.0:1 Β· You have 14.63:1
Quick presets
Based on WCAG 2.1 contrast guidelines. Large text = 18pt (24px) normal or 14pt (18.66px) bold. Hex codes update in both directions: type a hex or pick a color, both inputs stay in sync.
Common uses
- Audit Web Pages for WCAG ComplianceVerify your site's text colors meet WCAG AA or AAA contrast standards for accessibility.
- Verify Brand Color CombinationsTest your brand color palette pairings to ensure they work for accessible UI design.
- Test Dark Mode Color PalettesLight text on dark backgrounds can still fail contrast β check your dark mode palette pairings here.
- Color Pairings for Print MaterialsPosters, signs, and printed materials also need readable contrast β especially for older viewers.
- Design Accessible Button ColorsMake sure CTAs, action buttons, and links pass WCAG against their backgrounds.
How It Works
Contrast checking runs entirely in your browser using the WCAG 2.1 relative luminance algorithm β no library, no server, just hand-written math that follows the spec exactly. Every result updates in real time as you type or pick a color.
- 1Hex input and normalizationBoth 3-digit (#abc) and 6-digit (#aabbcc) hex values are accepted and normalized to full RGB triples. Invalid input is rejected immediately rather than silently defaulting to black, so a red border appears instead of a misleading pass result.
- 2WCAG luminance calculationEach color is converted to relative luminance using the WCAG 2.1 formula: sRGB channel values are linearized with a piecewise gamma correction (dividing by 12.92 below 0.03928, raising to the power of 2.4 above it), then weighted as 0.2126R + 0.7152G + 0.0722B.
- 3Contrast ratio and compliance checksThe contrast ratio is computed as (lighter + 0.05) / (darker + 0.05) and checked against all five WCAG thresholds: AA normal text (4.5:1), AA large text (3:1), AAA normal text (7:1), AAA large text (4.5:1), and UI components (3:1). Results update on every keystroke.
- 4Hue-preserving fix suggestionsWhen the pair fails WCAG AA, the tool searches HSL lightness space β stepping outward from the original lightness in both directions β to find the nearest variant of each color that passes 4.5:1 while keeping the same hue and saturation. The EyeDropper API (Chromium) is also available to sample any color directly from your screen.
Related Tools
Color Blindness Simulator
See how your design looks to people with color vision deficiencies. Simulates protanopia, deuteranopia, tritanopia, achromatopsia, and milder anomalies.
What Is My Screen Resolution
See your screen resolution in CSS and real pixels, window size, pixel ratio, colour depth, HDR, touch support and refresh rate, and copy it all.
Dead Pixel Test
Check your screen for dead or stuck pixels with full-screen black, white, red, green, blue and grey, plus an optional stuck pixel fixer.