DEVELOPER · ACCESSIBILITY

Verificador de Contraste de Cores (WCAG AA e AAA)

Avalie a taxa de contraste entre cores de texto e fundo para assegurar a conformidade com as diretrizes de acessibilidade WCAG 2.1. Inclui pré-visualização de tipografia real e avaliação instantânea dos níveis AA e AAA.

Pair checker

The quick brown fox jumps over the lazy dog.

Large Text Sample

—
contrast ratio
AA NormalAAA NormalAA LargeAAA LargeUI (3:1)

Contrast matrix

Add colors to compare all combinations

How to use

Select or paste any two hex, RGB, or HSL color values into the foreground and background pickers. The contrast ratio and WCAG compliance badges update in real-time. Use the matrix panel below to build an accessible palette by evaluating combinations simultaneously.

Example

Foreground:#1a1c1b (near black)
Background:#ffffff (white)
Contrast Ratio:17.4:1
Result:Passes WCAG AA Normal, AAA Normal, AA Large, and UI Component standards

How it works

Contrast is calculated using the official W3C WCAG 2.1 relative luminance formula: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker color. The ratio ranges from 1:1 (zero contrast, identical colors) to 21:1 (maximum contrast, pure black against pure white).

Real-world use cases

🎨

UI & Design Systems

Ensure button states, typography hierarchy, and badges meet accessibility criteria before shipping.

⚖️

Website Audits

Verify that brand guidelines satisfy legal accessibility mandates (ADA, Section 508, EAA).

🌙

Dark Mode Palettes

Check inverted shade readability on OLED black and dark neutral backgrounds.

ℹ️

WCAG 2.1 requirements: At least 4.5:1 for body copy (AA) and 7:1 for AAA compliance. Large text (≥ 18pt or 14pt bold) requires at least 3:1.

Client-side processing: All calculations run in your browser; your color tokens and design files are never transmitted to external servers.

Frequently asked questions

What is the minimum contrast ratio for body text?

WCAG 2.1 Level AA mandates a minimum contrast ratio of 4.5:1 for normal body text and 3:1 for large text (18pt / 24px regular or 14pt / 18.5px bold).

Do disabled buttons need to pass contrast tests?

No. Under WCAG 2.1 guideline 1.4.3, inactive user interface elements or decorative content have no contrast requirements, though keeping them legible improves user experience.

What does the UI (3:1) badge mean?

The 3:1 minimum applies to graphical objects and UI components per WCAG 2.1 Success Criterion 1.4.11, including form controls, icons, and focus indicators.

Related tools