Skip to main content

Contrast Accessibility Checker

Free Contrast accessibility tool for art & design fundamentals. Enter values to see solutions, formulas, and educational explanations.

Skip to calculator
Education & Learning

Contrast Accessibility Checker

Check color contrast ratios for WCAG 2.1 AA and AAA compliance. Test foreground and background color combinations for text readability and accessibility standards.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
10.98:1
Sample Text (24px Bold)
Normal body text at 16px regular weight
Small text at 14px for fine print and captions
Overall Rating
Excellent
APCA Contrast: Lc -101.9

WCAG 2.1 Compliance

Normal Text - AA
Requires 4.5:1 ratio
PASS
Normal Text - AAA
Requires 7:1 ratio
PASS
Large Text - AA
Requires 3:1 ratio (18pt+ or 14pt bold+)
PASS
Large Text - AAA
Requires 4.5:1 ratio
PASS
UI Components
Requires 3:1 ratio
PASS
Foreground Luminance
1.0000
Background Luminance
0.0456
Note: WCAG contrast requirements are minimum standards. For optimal readability, aim for higher contrast ratios, especially for long-form text content.
Your Result
Contrast: 10.98:1 | Excellent | Normal AA: PASS | AAA: PASS
Share Your Result
Understand the Math

Formula

Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)

Where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. Relative luminance is calculated from linearized sRGB values: L = 0.2126R + 0.7152G + 0.0722B. WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 and 4.5:1 respectively.

Last reviewed: December 2025

Worked Examples

Example 1: Testing White Text on Dark Blue Background

A website uses white text (#FFFFFF) on a dark blue-gray background (#2C3E50). Check if this meets WCAG AA and AAA requirements.
Solution:
Foreground luminance (white): 1.0000 Background luminance (#2C3E50): 0.0586 Contrast ratio: (1.0 + 0.05) / (0.0586 + 0.05) = 9.67:1 Normal text AA (4.5:1): PASS Normal text AAA (7:1): PASS Large text AA (3:1): PASS Large text AAA (4.5:1): PASS
Result: Contrast: 9.67:1 | Passes all WCAG levels | Excellent accessibility

Example 2: Checking Light Gray Text on White Background

A design uses light gray text (#999999) on a white background (#FFFFFF) for secondary content. Check if this is accessible.
Solution:
Foreground luminance (#999999): 0.3254 Background luminance (white): 1.0000 Contrast ratio: (1.0 + 0.05) / (0.3254 + 0.05) = 2.80:1 Normal text AA (4.5:1): FAIL Large text AA (3:1): FAIL Suggested fix: Darken text to at least #767676 for 4.54:1 ratio
Result: Contrast: 2.80:1 | Fails all levels | Change #999999 to #767676 or darker
Expert Insights

Background & Theory

The Contrast Accessibility Checker applies the following established principles and formulas. Educational measurement applies mathematical principles to quantify learning outcomes, track academic progress, and compare performance across students and institutions. Grade Point Average (GPA) is the central metric. In the standard four-point scale, letter grades are converted to grade points: A equals 4.0, B equals 3.0, C equals 2.0, D equals 1.0, and F equals 0. The GPA is then computed as the sum of (grade points multiplied by credit hours for each course) divided by total credit hours attempted. This weighted average ensures that high-credit courses exert proportionally greater influence on the final figure. Weighted GPA systems assign additional grade-point bonuses to honors, Advanced Placement, or International Baccalaureate courses, typically adding 0.5 to 1.0 points to acknowledge increased academic rigor. Unweighted GPA treats all courses equivalently regardless of difficulty. Percentile rank situates an individual score within a reference distribution: a student at the 75th percentile scored higher than 75 percent of the comparison group. Standardized tests use scaled scores and z-scores to normalize results across different test administrations. Standard deviation in test design quantifies how widely scores spread around the mean, informing item difficulty analysis and test reliability assessment. Bloom's Taxonomy, introduced in 1956, classifies cognitive learning into six hierarchical levels: remember, understand, apply, analyze, evaluate, and create. This framework guides curriculum design by ensuring assessments target higher-order thinking rather than only rote recall. Spaced repetition exploits the psychological spacing effect, whereby information reviewed at increasing intervals is retained far more efficiently than information reviewed in massed sessions. The SM-2 algorithm, developed by Piotr Wozniak in 1987, computes optimal review intervals using an ease factor updated after each recall attempt: I(n) = I(n-1) * EF, where the ease factor EF adjusts based on performance quality rated on a 0 to 5 scale. Flesch-Kincaid readability formulas estimate text difficulty. The Reading Ease score = 206.835 minus 1.015 times the average words per sentence minus 84.6 times the average syllables per word, where higher scores indicate easier text.

History

The history behind the Contrast Accessibility Checker traces back through the following developments. Formal mass education systems emerged in the early 19th century. Prussia established a compulsory state schooling system beginning around 1763 under Frederick the Great, though full enforcement and a structured curriculum took shape in the early 1800s. The Prussian model, emphasizing standardized instruction, teacher training, and compulsory attendance, became a template that the United States, Britain, Japan, and much of Europe adopted throughout the 19th century. Compulsory education laws spread across the industrializing world between roughly 1850 and 1900. Massachusetts passed the first such law in the United States in 1852. By the end of the century most developed nations had established free, publicly funded schooling systems with defined grade levels and curricula. The measurement of individual intelligence and academic aptitude arose at the turn of the 20th century. Alfred Binet, commissioned by the French government to identify students needing additional support, developed the first practical intelligence test in 1905 with Theodore Simon. Their scale introduced the concept of mental age and formed the basis for later intelligence quotient measurements. The Scholastic Aptitude Test, later the SAT, was introduced in the United States in 1926 by Carl Brigham, building on Army intelligence tests used during World War I. It became the dominant college admissions tool over the following decades, institutionalizing standardized testing in American secondary education. The second half of the 20th century brought accountability-driven reform. The Elementary and Secondary Education Act of 1965 tied federal funding to measured outcomes. The No Child Left Behind Act of 2001 required annual standardized testing in core subjects across all public schools and imposed consequences for persistent underperformance, intensifying debate about the validity and consequences of high-stakes testing. The 21st century introduced Massive Open Online Courses, or MOOCs, beginning with the Khan Academy in 2006 and expanding rapidly after Stanford's free online courses attracted hundreds of thousands of students in 2011. Digital learning platforms enabled spaced repetition software, adaptive assessments, and learning analytics to reach global audiences outside traditional institutions.

Share this calculator

Explore More

Frequently Asked Questions

The WCAG (Web Content Accessibility Guidelines) contrast ratio is a numerical measure of the difference in perceived luminance between foreground and background colors, ranging from 1:1 (no contrast, identical colors) to 21:1 (maximum contrast, black on white). It matters because approximately 1.3 billion people worldwide live with some form of visual impairment, and millions more experience situational impairments like screen glare or aging-related vision decline. Insufficient contrast makes text difficult or impossible to read for these users. WCAG compliance is also legally required in many jurisdictions, including under the Americans with Disabilities Act and the European Accessibility Act, making it both an ethical and legal consideration for web designers.
WCAG defines two conformance levels for contrast. Level AA requires a minimum contrast ratio of 4.5:1 for normal text (under 18pt or 14pt bold) and 3:1 for large text (18pt and above, or 14pt bold and above). Level AAA requires 7:1 for normal text and 4.5:1 for large text. Additionally, UI components and graphical objects that convey information must meet a 3:1 contrast ratio against adjacent colors. Most organizations target AA compliance as the minimum acceptable standard, while AAA is considered the gold standard for accessibility. Government websites in many countries are legally required to meet at least WCAG AA contrast standards.
The WCAG contrast ratio formula is (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. Relative luminance is calculated from linearized sRGB values using the formula L = 0.2126R + 0.7152G + 0.0722B, where each channel is first converted from sRGB gamma space to linear light using a piecewise function. The coefficients reflect the human eye sensitivity to different wavelengths, with green contributing the most to perceived brightness. The 0.05 offset prevents division by zero and accounts for ambient light reflections. This formula produces a ratio between 1:1 and 21:1.
APCA (Accessible Perceptual Contrast Algorithm) is a next-generation contrast measurement method being developed for WCAG 3.0 that addresses several limitations of the current WCAG 2.x contrast formula. Unlike the current symmetric formula where swapping foreground and background gives the same ratio, APCA accounts for the polarity effect where dark text on light backgrounds is more readable than light text on dark backgrounds. APCA also better handles middle-range colors and considers font size and weight as factors in the contrast requirement. The output is a percentage value (Lc) rather than a ratio, with different minimum thresholds for different text sizes and weights, providing more nuanced and accurate accessibility guidance.
When a color combination fails WCAG contrast requirements, you have several strategies to fix it. The most effective is to increase the lightness difference between foreground and background. Darken the darker color or lighten the lighter color until the target ratio is achieved. You can also adjust saturation, as reducing the saturation of either color while maintaining the hue can help. If your brand colors must remain unchanged, consider using them only for decorative elements or large headings while using higher-contrast colors for body text. Adding a semi-transparent overlay between text and background images ensures consistent readability regardless of image content. Contrast Accessibility Checker shows you exactly what luminance values you need to reach.
Color blindness (color vision deficiency) affects approximately 8 percent of men and 0.5 percent of women of Northern European descent, with protanopia (red weakness) and deuteranopia (green weakness) being the most common types. People with color blindness can generally perceive luminance contrast normally, which is why WCAG contrast ratios based on luminance remain effective for most color-blind users. However, colors that appear distinct to typical vision may be indistinguishable to color-blind users, so never rely solely on color to convey information. Additionally, some color combinations that pass contrast checks may be particularly difficult for specific types of color blindness. Test your designs with color blindness simulation tools alongside this contrast checker.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)

Where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. Relative luminance is calculated from linearized sRGB values: L = 0.2126R + 0.7152G + 0.0722B. WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 and 4.5:1 respectively.

Worked Examples

Example 1: Testing White Text on Dark Blue Background

Problem: A website uses white text (#FFFFFF) on a dark blue-gray background (#2C3E50). Check if this meets WCAG AA and AAA requirements.

Solution: Foreground luminance (white): 1.0000\nBackground luminance (#2C3E50): 0.0586\nContrast ratio: (1.0 + 0.05) / (0.0586 + 0.05) = 9.67:1\nNormal text AA (4.5:1): PASS\nNormal text AAA (7:1): PASS\nLarge text AA (3:1): PASS\nLarge text AAA (4.5:1): PASS

Result: Contrast: 9.67:1 | Passes all WCAG levels | Excellent accessibility

Example 2: Checking Light Gray Text on White Background

Problem: A design uses light gray text (#999999) on a white background (#FFFFFF) for secondary content. Check if this is accessible.

Solution: Foreground luminance (#999999): 0.3254\nBackground luminance (white): 1.0000\nContrast ratio: (1.0 + 0.05) / (0.3254 + 0.05) = 2.80:1\nNormal text AA (4.5:1): FAIL\nLarge text AA (3:1): FAIL\nSuggested fix: Darken text to at least #767676 for 4.54:1 ratio

Result: Contrast: 2.80:1 | Fails all levels | Change #999999 to #767676 or darker

Frequently Asked Questions

What is WCAG contrast ratio and why does it matter?

The WCAG (Web Content Accessibility Guidelines) contrast ratio is a numerical measure of the difference in perceived luminance between foreground and background colors, ranging from 1:1 (no contrast, identical colors) to 21:1 (maximum contrast, black on white). It matters because approximately 1.3 billion people worldwide live with some form of visual impairment, and millions more experience situational impairments like screen glare or aging-related vision decline. Insufficient contrast makes text difficult or impossible to read for these users. WCAG compliance is also legally required in many jurisdictions, including under the Americans with Disabilities Act and the European Accessibility Act, making it both an ethical and legal consideration for web designers.

What are the WCAG AA and AAA contrast requirements?

WCAG defines two conformance levels for contrast. Level AA requires a minimum contrast ratio of 4.5:1 for normal text (under 18pt or 14pt bold) and 3:1 for large text (18pt and above, or 14pt bold and above). Level AAA requires 7:1 for normal text and 4.5:1 for large text. Additionally, UI components and graphical objects that convey information must meet a 3:1 contrast ratio against adjacent colors. Most organizations target AA compliance as the minimum acceptable standard, while AAA is considered the gold standard for accessibility. Government websites in many countries are legally required to meet at least WCAG AA contrast standards.

How is the contrast ratio calculated?

The WCAG contrast ratio formula is (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color. Relative luminance is calculated from linearized sRGB values using the formula L = 0.2126R + 0.7152G + 0.0722B, where each channel is first converted from sRGB gamma space to linear light using a piecewise function. The coefficients reflect the human eye sensitivity to different wavelengths, with green contributing the most to perceived brightness. The 0.05 offset prevents division by zero and accounts for ambient light reflections. This formula produces a ratio between 1:1 and 21:1.

What is APCA and how does it differ from WCAG contrast?

APCA (Accessible Perceptual Contrast Algorithm) is a next-generation contrast measurement method being developed for WCAG 3.0 that addresses several limitations of the current WCAG 2.x contrast formula. Unlike the current symmetric formula where swapping foreground and background gives the same ratio, APCA accounts for the polarity effect where dark text on light backgrounds is more readable than light text on dark backgrounds. APCA also better handles middle-range colors and considers font size and weight as factors in the contrast requirement. The output is a percentage value (Lc) rather than a ratio, with different minimum thresholds for different text sizes and weights, providing more nuanced and accurate accessibility guidance.

How can I fix a color combination that fails contrast requirements?

When a color combination fails WCAG contrast requirements, you have several strategies to fix it. The most effective is to increase the lightness difference between foreground and background. Darken the darker color or lighten the lighter color until the target ratio is achieved. You can also adjust saturation, as reducing the saturation of either color while maintaining the hue can help. If your brand colors must remain unchanged, consider using them only for decorative elements or large headings while using higher-contrast colors for body text. Adding a semi-transparent overlay between text and background images ensures consistent readability regardless of image content. Contrast Accessibility Checker shows you exactly what luminance values you need to reach.

How does color blindness affect contrast perception?

Color blindness (color vision deficiency) affects approximately 8 percent of men and 0.5 percent of women of Northern European descent, with protanopia (red weakness) and deuteranopia (green weakness) being the most common types. People with color blindness can generally perceive luminance contrast normally, which is why WCAG contrast ratios based on luminance remain effective for most color-blind users. However, colors that appear distinct to typical vision may be indistinguishable to color-blind users, so never rely solely on color to convey information. Additionally, some color combinations that pass contrast checks may be particularly difficult for specific types of color blindness. Test your designs with color blindness simulation tools alongside this contrast checker.

References

Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy