Contrast Checker

WCAG Contrast Checker

Check color contrast ratios for WCAG 2.1 AA and AAA compliance

Contrast Ratio
14.68:1
Excellent
AA Normal Text
4.5:1 required
Pass
AA Large Text
3:1 required
Pass
AAA Normal Text
7:1 required
Pass
AAA Large Text
4.5:1 required
Pass
Live Preview

Large text preview (28px bold)

Normal text preview at 16px. This is how body text would look with your chosen color combination. Good contrast ensures readability for all users, including those with visual impairments.

Small text preview at 12px. Fine print and captions at this size need especially good contrast to remain legible.

Presets

What is Color Contrast?

Color contrast refers to the difference in perceived brightness between two colors placed next to each other. In web design, contrast is most critical between text and its background color. High contrast makes text easier to read, while low contrast can render content illegible for many users. The contrast ratio is a numerical value that quantifies this difference, ranging from 1:1 (no contrast) to 21:1 (maximum contrast, black on white).

WCAG Contrast Guidelines Explained

The Web Content Accessibility Guidelines (WCAG) 2.1, published by the W3C Web Accessibility Initiative, define specific contrast requirements to ensure digital content is accessible to people with visual impairments. These guidelines are organized into three conformance levels: A (minimum), AA (recommended), and AAA (enhanced).

LevelNormal TextLarge Text
AA (Minimum)4.5:13:1
AAA (Enhanced)7:14.5:1

AA vs AAA: Which Level Should You Target?

AA compliance is the standard recommended for most websites and applications. It provides a good balance between accessibility and design flexibility. Most legal requirements (such as the ADA, Section 508, and the European Accessibility Act) reference WCAG AA as the minimum standard. AAA compliance is the gold standard and is recommended for content that serves users with significant visual impairments or for critical information like medical or legal text. However, achieving AAA across an entire website can be challenging without significantly limiting your color palette.

Why Accessibility Matters

Web accessibility is not just a legal requirement — it is a fundamental aspect of inclusive design. Approximately 15% of the world’s population lives with some form of disability, and around 2.2 billion people have a vision impairment. Ensuring sufficient color contrast benefits everyone:

Users with Low Vision

People with reduced visual acuity need higher contrast to distinguish text from backgrounds. This includes older adults whose vision naturally degrades over time.

Color-Blind Users

About 8% of men and 0.5% of women have color vision deficiency. Good luminance contrast ensures readability regardless of color perception differences.

Mobile & Outdoor Users

Bright sunlight, screen glare, and small mobile screens all reduce effective contrast. Well-designed contrast ratios ensure readability in any environment.

Legal Compliance

Laws like the ADA, Section 508, EN 301 549, and the European Accessibility Act require digital content to meet WCAG standards, making compliance a business necessity.

How to Fix Low Contrast

If your color combination fails WCAG requirements, here are practical strategies to improve contrast while maintaining your design aesthetic:

  • Darken the text— Even a small shift toward darker values can push you past the threshold without visibly changing your design.
  • Lighten the background— A slightly lighter background increases luminance difference while keeping your palette cohesive.
  • Increase font size or weight— Large text (18pt+) or bold text (14pt+) only needs a 3:1 ratio at the AA level, giving you more flexibility.
  • Add a semi-transparent overlay— When placing text over images, add a dark or light overlay between the image and text to ensure consistent contrast.
  • Use text shadows or outlines— A subtle shadow or outline can add enough contrast for text on variable backgrounds.
  • Choose colors from the same hue family— A dark navy on a pale blue can maintain brand colors while achieving good contrast.

How Contrast Ratio is Calculated

The WCAG contrast ratio formula involves three steps:

  1. Convert sRGB to linear RGB:Each color channel (R, G, B) is converted from 0–255 to 0–1, then linearized. If the value is less than or equal to 0.03928, divide by 12.92. Otherwise, compute ((value + 0.055) / 1.055) ^ 2.4.
  2. Calculate relative luminance:L = 0.2126 × R + 0.7152 × G + 0.0722 × B, where R, G, B are the linearized values. This weights green most heavily because human vision is most sensitive to green light.
  3. Compute the contrast ratio: Ratio = (L_lighter + 0.05) / (L_darker + 0.05). The 0.05 offset prevents division by zero and accounts for ambient light.

Frequently Asked Questions

Color contrast ratio measures the difference in perceived luminance between two colors. It ranges from 1:1 (no contrast, identical colors) to 21:1 (maximum contrast, black on white). The ratio is calculated using the relative luminance of each color according to the WCAG 2.1 formula.

WCAG 2.1 (Web Content Accessibility Guidelines) is a set of recommendations published by the W3C for making web content more accessible to people with disabilities. It includes specific contrast ratio requirements for text and visual elements to ensure readability for users with low vision or color deficiencies.

AA is the minimum recommended level of accessibility. It requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. AAA is a higher, enhanced level requiring 7:1 for normal text and 4.5:1 for large text. Most organizations target AA compliance, while AAA is ideal for critical content.

Large text is defined as 18pt (24px) or larger for regular weight, or 14pt (approximately 18.66px) or larger for bold text. Large text has a lower contrast requirement because bigger characters are inherently easier to read.

Approximately 1 in 12 men and 1 in 200 women have some form of color vision deficiency. Low contrast text is also difficult to read for people with low vision, older adults, and anyone viewing a screen in bright sunlight. Good contrast ensures your content is readable by the widest possible audience.

To improve contrast, darken your text color or lighten your background (or vice versa). Increase the lightness difference between the two colors. Avoid placing text on busy backgrounds or images without an overlay. You can also increase font size or weight, since large/bold text has a lower contrast requirement.

Yes. This contrast checker runs 100% in your browser using client-side JavaScript. No color data is sent to any server. You can even use it offline once the page has loaded.

This tool focuses on text contrast ratios. WCAG 2.1 also has a non-text contrast requirement (Success Criterion 1.4.11) that requires a 3:1 ratio for UI components and graphical objects. The same contrast calculation applies, so you can use this tool to check those combinations as well.

Relative luminance is the relative brightness of a color in a colorspace, normalized to 0 for the darkest black and 1 for the lightest white. It accounts for the fact that human eyes perceive green light as brighter than red, and red as brighter than blue. The formula uses weighted sRGB values: L = 0.2126R + 0.7152G + 0.0722B.

Absolutely. WCAG contrast requirements apply to any digital interface, including mobile apps, desktop software, and web applications. The contrast ratio calculation is the same regardless of the platform, so this tool works for any design project.