Evaluate foreground and background color combinations against WCAG 2.1 AA and AAA standards with real-time luminance calculations, smart auto-fix adjustments, and live typography previews.
Normal Body Text Sample: This paragraph demonstrates how standard body typography (14px/16px) renders over the chosen background color.
Secondary Subtitle Text
Color Tools Guide
About the WCAG Color Contrast & Accessibility Evaluator
Digital accessibility ensures that websites and applications remain legible and functional for everyone, including individuals with low vision, color blindness, or situational impairments like glare. This WCAG Contrast Evaluator computes relative luminance and exact contrast ratios (from 1:1 to 21:1) in strict adherence to W3C specifications. Test text and background pairs, check AA/AAA compliance badges across various font sizes, preview real UI components, and use the 1-click auto-fix tool to achieve compliance with minimal color shifting.
In-Depth Technical Guide
How WCAG Color Contrast & Accessibility EvaluatorWorks & What the Results Mean
How the W3C Calculates Relative Luminance and Contrast
The WCAG 2.1 contrast formula measures the relative luminance ($Y$) of two colors on a scale from 0 (absolute black) to 1 (pure white). Before computing luminance, sRGB values must be linearized to remove gamma correction:
Linearizing Channel Values: For each normalized channel $C \in \{R, G, B\}$, if $C \le 0.04045$, $C_{lin} = C / 12.92$; otherwise $C_{lin} = ((C + 0.055) / 1.055)^{2.4}$.
Computing Luminance: $Y = 0.2126 \times R_{lin} + 0.7152 \times G_{lin} + 0.0722 \times B_{lin}$, reflecting the human eye's heightened sensitivity to green wavelengths.
Contrast Ratio Formula: $\text{Ratio} = (L_1 + 0.05) / (L_2 + 0.05)$, where $L_1$ is the lighter color and $L_2$ is the darker color.
Understanding WCAG Compliance Levels
Level AA (Standard): Requires a minimum ratio of 4.5:1 for regular body text (under 18pt or 14pt bold) and 3.0:1 for large text and critical UI components (form borders, icons).
Level AAA (Enhanced): Demands a stricter 7.0:1 ratio for normal text and 4.5:1 for large headings, recommended for reading-heavy content and public-sector websites.
Step-by-Step Guide
How to Use WCAG Color Contrast & Accessibility Evaluator
1Select your Foreground (Text or Icon) color using the visual spectrum box or by entering a hex string.
2Select your Background surface color with the picker or hex input.
3Click 'Swap' to instantly reverse foreground and background assignments.
4Review the numeric contrast ratio readout (e.g., 14.8:1) and the AA/AAA compliance grid for body text, large headings, and UI controls.
5Inspect the live readability preview card to evaluate real typography samples across headings, body paragraphs, and button states.
6If the contrast fails to meet standards, click 'Fix Contrast' or select a smart recommendation to reach compliance with minimal hue drift.
Capabilities
Key Features & Highlights
Accurate relative luminance and contrast ratio calculations based on official W3C WCAG 2.1 specifications (1:1 to 21:1).
Comprehensive compliance matrix covering Normal Text (AA 4.5:1 / AAA 7.0:1), Large Text (AA 3.0:1 / AAA 4.5:1), and UI Components (AA 3.0:1).
Embedded 2D spectrum canvas with dedicated hue sliders for both foreground and background layers.
One-click 'Fix Contrast' tool that automatically shifts lightness to achieve a passing 4.5:1 ratio while preserving brand hue.
Smart recommendation chips presenting minimal-shift color alternatives with instant one-click application.
Live typography preview showing realistic headings, body copy, badge pills, and interactive button mockups.
Quick-load contrast pairs covering dark-on-light, light-on-dark, monochrome, and intentional low-contrast fail states.
Practical Scenarios
Examples & Real-World Use Cases
Dark Slate Text on Pure White Background
Scenario: Testing primary body typography legibility for an editorial article layout.
Sample Input:
Foreground: #0F172A | Background: #FFFFFF
Expected Output:
Contrast Ratio: 16.1:1 | Normal AA: Pass ✅ | Normal AAA: Pass ✅
Exceeds all accessibility criteria for normal text, large headings, and interface icons.
Muted Gray Text on White Card
Scenario: Checking whether secondary caption text meets minimum legibility requirements.
Sample Input:
Foreground: #94A3B8 | Background: #FFFFFF
Expected Output:
Contrast Ratio: 2.6:1 | Normal AA: Fail ❌ | Normal AAA: Fail ❌
WCAG 2.1 Level AA requires a contrast ratio of at least 4.5:1 for normal text (under 18pt or 14pt bold) and at least 3.0:1 for large text (18pt+ or 14pt bold) and active UI components.