WCAG Contrast Calculator
Check if your color combinations meet WCAG 2.1 accessibility standards
Calculate the contrast ratio between two colors and verify if they meet WCAG accessibility guidelines.
Colors
Resultados
Ratio de Contraste
21.00
:1Nivel WCAG
AAA
Previsualización
Ejemplo de texto con los colores seleccionados
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
How it works
Color contrast is fundamental for web accessibility. WCAG (Web Content Accessibility Guidelines) establishes minimum contrast ratios to ensure content is readable for people with visual disabilities.
What is contrast ratio?
The contrast ratio is a measure that compares the relative luminance of two colors. It's expressed as a ratio (e.g., 4.5:1) where the first number represents the lighter color and the second the darker one.
WCAG Conformance Levels
- Level AA (minimum recommended): 4.5:1 ratio for normal text, 3:1 for large text
- Level AAA (optimal): 7:1 ratio for normal text, 4.5:1 for large text
What is considered large text?
According to WCAG, large text is at least 18pt (24px) or 14pt (18.5px) bold. Graphics and UI components require a minimum ratio of 3:1.
Contrast Formula
The ratio is calculated using the relative luminance of each color:
Ratio = (L1 + 0.05) / (L2 + 0.05)Where L1 is the luminance of the lighter color and L2 of the darker one.
💡 Practical Use Cases
Case 1: Call-to-action button
You have an orange button #FF6B35 with white text. Does it meet WCAG AA?
→ Ratio: 3.2:1 ❌ Fails AA for normal text
→ Solution: Darken to #D94E1A → Ratio: 4.6:1 ✅
Case 2: Text over background image
Your hero has white text over an image. The average background color is #5A7D9A.
→ Ratio with white: 3.8:1 ⚠️ Only passes for large text
→ Add dark overlay rgba(0,0,0,0.4) to improve
Case 3: Form with placeholder
Input with white background and light gray placeholder #CCCCCC.
→ Ratio: 1.6:1 ❌ Too low
→ Use #767676 → Ratio: 4.5:1 ✅ Passes AA