Developer Tool

Color Contrast Checker.

Ensure your website is accessible. Check the contrast ratio between text and background colors to meet WCAG 2.1 accessibility standards.

17.40
:1
AAA

Contrast Ratio

Text Color

RGB(26, 26, 26)

Background Color

RGB(255, 255, 255)

Live Preview

Large Heading Text

Subheading or emphasized content

This is normal body text at 16px. It should be easy to read for extended periods. Good contrast is essential for accessibility and user experience.

Small text (14px) - often used for captions, metadata, or secondary information.

Tiny text (12px) - Labels and micro-copy

WCAG 2.1 Compliance

AA Normal
≥ 4.5:1
✓ PASS
AA Large
≥ 3:1
✓ PASS
AAA Normal
≥ 7:1
✓ PASS
AAA Large
≥ 4.5:1
✓ PASS

Color Schemes

Accessibility
Brand
Dark UI

Design for Everyone, Not Just Compliance

The Color Contrast Checker is a precision tool built for designers and developers who take accessibility seriously. Beyond meeting legal requirements like WCAG 2.1 and ADA, proper contrast ensures your content is readable for the 1 in 12 men and 1 in 200 women with color vision deficiency, as well as anyone reading a screen in bright sunlight.

The Technical Formula

Contrast ratio is calculated using Relative Luminance, which measures the perceived brightness of a color on a scale from 0 (black) to 1 (white).

// Relative Luminance (L)

L = 0.2126 * R + 0.7152 * G + 0.0722 * B

(where R, G, B are linearized sRGB values)

// Contrast Ratio

CR = (L1 + 0.05) / (L2 + 0.05)

(L1 = lighter, L2 = darker)

Developer Reference

Use CSS custom properties to manage accessible color pairings across your application. This approach makes global updates trivial.

/* Design System Tokens */

:root {

--text-primary: #1A1A1A;

--bg-primary: #FFFFFF;

/* Ratio: 16.1:1 (AAA Pass) */

}

WCAG 2.1 Conformance Levels

Reference Standard [W3C]
LevelText Type Min Ratio Current
AANormal Text (<18pt)4.5:1PASS
AALarge Text (≥18pt)3:1PASS
AAANormal Text (<18pt)7:1PASS
AAALarge Text (≥18pt)4.5:1PASS

Chrome DevTools

In the Elements panel, click any color swatch in the Styles pane. The color picker shows the contrast ratio against the background and provides AA/AAA lines to snap to.

Firefox Accessibility

The dedicated Accessibility tab provides a full-page audit. Use "Check for Issues" → "Contrast" to identify all failing elements at once.

Figma & Design Tools

Plugins like Stark or A11y - Color Contrast Checker integrate directly into your design workflow, flagging issues before handoff.

Accessibility FAQ

Is Level AAA legally required?

In most jurisdictions, Level AA is the legal requirement (ADA, Section 508, EN 301 549). AAA is the gold standard and recommended for critical content like government services or healthcare.

Does contrast apply to icons and graphics?

WCAG 2.1 extends requirements to "non-text contrast" for UI components and graphical objects. The minimum ratio is 3:1 for all essential visual elements.

What about placeholders in inputs?

Placeholder text is notoriously low-contrast by default. Ensure your placeholders meet at least 4.5:1, or use alternative patterns like visible labels instead.

Can I fail for too much contrast?

Technically no, but pure black (#000) on pure white (#FFF) can cause eye strain for some users. A soft approach like #1A1A1A on #FAFAFA maintains high contrast with better readability.