Color Contrast Checker
Evaluate color contrast ratios in real time against WCAG 2.1 accessibility standards. Test text against background surfaces with live typography previews and compliance checks.
WCAG 2.1 Success Criteria Breakdown
Minimum contrast for regular text under 18pt (24px) or bold text under 14pt (~18.66px).
Minimum contrast for large text: at least 18pt (24px) regular or 14pt (~18.66px) bold.
Visual information required to identify interactive controls, buttons, borders, and graphical objects.
Enhanced contrast level recommended for maximum legibility and users with low vision.
Enhanced contrast for large text of at least 18pt regular or 14pt bold.
Live Typography & UI Preview
Accessible Typography Preview
18pt (24px) Bold Display HeadingLarge Text Subheading (14pt Bold)
Qualifies for WCAG Large Text 3.0:1 thresholdThe quick brown fox jumps over the lazy dog. Sufficient color contrast guarantees that written content remains readable for all audiences, including people experiencing low vision, color vision deficiencies, screen glare, or mobile viewing outdoors.
15px Regular Body Copy • Requires 4.5:1 for Level AAAbout Color Contrast Checker
Accessibility & WCAG Compliance Engine
Real-Time Contrast Ratio Calculation for Inclusive Design
ToolsUFO Color Contrast Checker evaluates the luminance contrast ratio between foreground text and background colors according to the Web Content Accessibility Guidelines (WCAG 2.1). It helps UI/UX designers and front-end engineers ensure interfaces are legible for all users, including those with visual impairments.
The calculation engine computes relative luminance using the standard sRGB CIE color space formula: (L1 + 0.05) / (L2 + 0.05). It provides immediate Level AA and Level AAA compliance scores across normal text, large text, and graphical interface components.
Features interactive hex and RGB inputs, quick color inversion, and live visual preview cards showing realistic typography hierarchies. Accessible color testing runs directly in your browser with zero latency.
WCAG 2.1 Standard
Precise evaluation for Level AA and Level AAA conformance across all typography scales.
Real-Time Ratios
Instant numerical feedback across normal text, large headings, and interactive UI controls.
Visual Previews
Realistic text and button preview cards to verify readability under authentic conditions.
Four Simple Steps to Test Color Contrast
Interactive WCAG 2.1 contrast evaluation with relative luminance analysis, real-time typography preview, and compliance criteria.
Pick Foreground Color
Select your text, icon, or element color using the color picker or input a 3 or 6-digit HEX code.
Select Surface Background
Choose your canvas or component background to evaluate readability across light, dark, or brand colored surfaces.
Compute Contrast Ratio
Instantly evaluate the exact W3C relative luminance and contrast ratio ranging from 1:1 up to 21:1.
Verify WCAG Compliance
Review comprehensive Level AA and AAA pass/fail benchmarks for normal body text, large headings, and UI controls.
Frequently Asked Questions
Everything you need to know about WCAG 2.1 contrast guidelines, Level AA vs AAA requirements, relative luminance, and accessible typography.
The Web Content Accessibility Guidelines (WCAG) 2.1 define contrast ratio as the difference in perceived luminance between two colors: foreground (such as text or icons) and background (the surface behind it). Adequate contrast ensures that digital content remains readable for all people, including users with moderately low vision, age-related vision changes, or color vision deficiencies, as well as anyone viewing screens in bright sunlight.
Level AA is the standard legal and commercial compliance benchmark required by international accessibility laws such as Section 508, the Americans with Disabilities Act (ADA), and the European standard EN 301 549. It mandates a minimum contrast ratio of 4.5:1 for regular body text and 3.0:1 for large text.
Level AAA is the highest enhanced accessibility tier, designed for specialized high-accessibility environments and users with severe low vision. It requires a contrast ratio of at least 7.0:1 for normal text and 4.5:1 for large text.
Under WCAG 2.1, text is considered Large Text only if it meets at least one of two size specifications:
- At least 18 pt regular font weight (equivalent to 24px in CSS pixels at standard 96 DPI).
- At least 14 pt bold font weight (equivalent to approximately 18.66px / 19px in CSS pixels).
Because larger letterforms feature thicker strokes and more distinct glyph geometries, they remain readable at the lower contrast threshold of 3.0:1 for Level AA (and 4.5:1 for Level AAA). Standard body text under these dimensions must satisfy the stricter 4.5:1 threshold.
Under WCAG 2.1 Success Criterion 1.4.11 (Non-text Contrast), visual information required to identify active user interface components (such as button boundaries, input field outlines, and focus rings) and graphical objects (such as standalone chart elements or functional icons) must achieve a contrast ratio of at least 3.0:1 against adjacent background surfaces.
Relative luminance (L) measures the relative brightness of any point in a colorspace, normalized from 0 for the darkest black to 1 for the lightest white. WCAG 2.1 defines relative luminance in the sRGB colorspace using spectral weighting that matches human photoreceptor sensitivity:
L = 0.2126 × R + 0.7152 × G + 0.0722 × B
Human eyes are most sensitive to green wavelengths (71.52% weighting) and least sensitive to blue (7.22%). The 8-bit color channels are first linearized by undoing sRGB gamma companding before applying these coefficients (dividing by 12.92 for low values ≤ 0.04045 per W3C guidance, or using the exponential gamma curve for higher values).
No. The contrast ratio formula is (L1 + 0.05) / (L2 + 0.05), where L1 is always the lighter color's luminance and L2 is the darker color's luminance. Because the lighter value is always in the numerator, the resulting mathematical ratio is identical whether a color is used as the foreground or background.
The hex color #767676 is well known among UI/UX designers and accessibility engineers as the baseline gray that achieves an exact contrast ratio of 4.54:1 against pure white (#ffffff). Any gray lighter than #767676 (such as #777777 or #808080) will fail WCAG Level AA for normal body text on a white canvas.
No. All relative luminance calculations, contrast algorithms, and color space conversions run 100% client-side in your web browser. No network requests are made, and your design palette data is never collected or stored.
Related Developer Tools
Explore complementary utilities to format code, generate secure hashes, and test regular expressions.