Text & Background Contrast Checker

Test color contrast against WCAG 2.1 accessibility guidelines. Ensure readable typography and compliant UI design across light and dark backgrounds.

14.62 : 1
Superb contrast ratio — passes all WCAG AAA criteria.

Preview Heading

This is sample normal body text to demonstrate readability and contrast compliance.

WCAG Level & Element Type Requirement Status
Normal Text (AA)≥ 4.5 : 1Pass
Large Text (≥ 18pt / 14pt bold) (AA)≥ 3.0 : 1Pass
UI Components & Icons (AA)≥ 3.0 : 1Pass
Normal Text (AAA)≥ 7.0 : 1Pass
Large Text (AAA)≥ 4.5 : 1Pass
Embed this tool on your website / blog No code required · Copy and paste
HTML Embed Code (iframe):
<iframe src="https://lucentool.com/color-contrast-checker" width="100%" height="650" style="border:1px solid #e5e0d8;border-radius:12px;max-width:850px;width:100%;" frameborder="0"></iframe>
<div style="font-size:12px;color:#78716c;margin-top:6px;font-family:sans-serif;">Powered by <a href="https://lucentool.com/color-contrast-checker" target="_blank" style="color:#c85a32;text-decoration:none;">Lucentool - Text & Background Contrast Checker</a></div>

Understanding WCAG Contrast Standards

The Web Content Accessibility Guidelines (WCAG) 2.1 define contrast ratios to ensure visual readability for users with low vision or color vision deficiencies.

WCAG 2.1 Requirements Overview

What happens in the page

hexToRgb() parses the colour, getLuminance() applies the WCAG definition — divide each channel by 255, linearise with the 12.92 divisor below 0.03928 and the 2.4 power above it, then weight the channels — and calcContrast() combines two luminances as L1 plus 0.05 over L2 plus 0.05. badge() compares that ratio against the 4.5 and 7 thresholds and labels the pair as passing or failing, with the large-text threshold applied separately.

Where it breaks down

WCAG 2.x only. The APCA model proposed for WCAG 3 produces different verdicts, particularly for light text on dark backgrounds, so a pair that passes here may still look weak. Translucent colours are not composited — you must supply the final rendered colour. Gradients, images and text shadows cannot be evaluated. The large-text thresholds assume you judge the font size and weight yourself.

Privacy: no data leaves this tab

Two colour values are turned into a ratio in memory. Nothing is stored, and no design system or brand asset is transmitted.

Frequently asked questions

What is the difference between AA and AAA?

AA needs 4.5:1 for body text and 3:1 for large text; AAA raises those to 7:1 and 4.5:1. Large text means roughly 18pt, or 14pt bold.

Why does it disagree with a design tool?

Different formula generations, or a different large-text rule. WCAG's published formula is the reference; older approximations drift at the extremes.

Can I check text over an image?

Not here. The tool needs two solid colours; sample the actual background colour from the image first.