Home » Tools » Color Contrast Checker
🛡️ 100% Client-Side Engine • Zero Server Retention

WCAG Color Contrast & Accessibility Checker

Calculate exact relative luminance contrast ratios to guarantee ADA and WCAG 2.1 (AA & AAA) digital accessibility compliance for web copy, headings, and interface components.

🎨 Color Palette Inputs

Hex format (e.g. #D7001D or #0F172A).
Hex format (e.g. #FFFFFF or #FAFBFD).

📊 Contrast Analysis & Compliance

4.58:1
Passes WCAG AA (Compliant)

Visual Sample Heading

This preview renders your exact foreground and background colors in real time. Legible contrast improves readability and user engagement.

Normal Text (AA)
Min 4.5:1
PASS
Normal Text (AAA)
Min 7.0:1
FAIL
Large Text (AA)
Min 3.0:1 (≥18pt / 14pt bold)
PASS
Large Text (AAA)
Min 4.5:1
PASS
UI & Icons (AA)
Min 3.0:1 (Borders & Controls)
PASS
Target Standard
WCAG 2.1 Guidelines
Official W3C
Web Accessibility & Legal Compliance

The Architectural Guide to WCAG Color Contrast, Photometric Luminance & Inclusive UX

Learn the exact mathematics governing relative luminance, how the Web Content Accessibility Guidelines (WCAG 2.1 & 2.2) determine visual legibility, and how to insulate your brand against ADA Title III compliance lawsuits while enhancing overall user experience.

⚖️ ADA & EAA Legal Safeguard

Federal courts in the United States and enforcement bodies under the European Accessibility Act (EAA) routinely reference WCAG 2.1 Level AA as the legal benchmark for non-discrimination in digital spaces. Low-contrast text remains the #1 detected accessibility error in automated website audits.

👁️ Color Vision Deficiencies

Over 300 million people worldwide live with color blindness (protanopia, deuteranopia, or tritanopia). Relying solely on color hue to communicate interface state—without sufficient relative luminance contrast—renders crucial navigation links and buttons invisible to up to 8% of male web users.

📱 Outdoor & Mobile Readability

Contrast is not merely for users with permanent visual impairments. In bright outdoor sunlight or on degraded mobile displays operating in battery-saver mode, screens lose perceived contrast by up to 60%. High-contrast designs ensure high mobile task completion rates under real-world lighting conditions.

1. The Photometric Science of Relative Luminance

Contrast ratio is not calculated by subtracting raw RGB hexadecimal numbers. Human eyes do not perceive color brightness linearly across different wavelengths of light; our retinas contain photoreceptor cone cells that are far more sensitive to green wavelengths than to red or blue.

The World Wide Web Consortium (W3C) standardizes relative luminance (designated as L) as the relative brightness of any point in a colorspace, normalized to 0 for the darkest black and 1 for the lightest white. To calculate relative luminance accurately, the 8-bit sRGB color channels (0 to 255) must first be linearized by reversing gamma correction:

Mathematical Inverse Gamma Expansion (IEC 61966-2-1)

For each sRGB channel (R, G, B), let s = channel / 255:
• If s <= 0.04045, then c = s / 12.92
• If s > 0.04045, then c = ((s + 0.055) / 1.055) ^ 2.4
Then calculate photometric relative luminance:
L = 0.2126 * R_linear + 0.7152 * G_linear + 0.0722 * B_linear

Notice that green accounts for over 71.5% of perceived luminance, while red contributes 21.3%, and blue accounts for merely 7.2%. This explains why pure blue text on a black background yields an abysmal contrast ratio of only 2.1:1 despite being two completely different primary hues.

2. Calculating the Final Contrast Ratio

Once the relative luminance values of the foreground color (L1) and the background surface (L2) are determined, they are ordered such that L1 represents the lighter color and L2 represents the darker color. The contrast ratio is defined by the formula:

The W3C Contrast Ratio Formula

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

The constant 0.05 represents ambient flare compensations for viewing screens in dimly lit environments. The mathematical ratio ranges from 1:1 (identical colors, zero contrast) to 21:1 (pure black #000000 against pure white #ffffff).

3. WCAG 2.1 and WCAG 2.2 Conformance Levels Explained

The W3C defines three tiers of digital accessibility conformance: Level A (minimum), Level AA (standard acceptable industry threshold), and Level AAA (specialized high-accessibility standard). In modern web design, compliance is measured across distinct UI text categories:

Level AA Success Criteria (The Legal Benchmark)

  • Criterion 1.4.3 (Contrast Minimum - Normal Body Text): Visual presentation of text and images of text must maintain a contrast ratio of at least 4.5:1. Normal text is defined as any font below 18pt (24px) regular weight or below 14pt (18.66px) bold weight.
  • Criterion 1.4.3 (Large Scale Text): Large text (defined as at least 18pt / 24px or 14pt / 18.66px bold) requires a reduced minimum ratio of 3:1, recognizing that heavier, larger glyph strokes are easier for low-vision readers to resolve.
  • Criterion 1.4.11 (Non-Text Contrast - Added in WCAG 2.1): Visual information required to identify active user interface components (such as form field borders, toggle switches, tab indicators, and search icons) and graphical objects (infographic charts) must achieve at least 3:1 against adjacent background surfaces.

Level AAA Success Criteria (Enhanced Accessibility)

  • Criterion 1.4.6 (Contrast Enhanced): Normal body copy must achieve at least 7:1, providing crystal-clear legibility for elderly users and individuals with moderate visual impairments. Large text must achieve at least 4.5:1.

Comprehensive WCAG Contrast Conformance Matrix

This reference table summarizes the exact contrast requirements across every interface element:

Interface Element Typography Specification WCAG Level AA WCAG Level AAA Target Compliance Context
Standard Body Text Under 18pt (24px) regular, or under 14pt bold 4.5:1 7.0:1 Articles, blog paragraphs, table cells, form labels
Large Display Headings 18pt (24px)+ regular, or 14pt (18.66px)+ bold 3.0:1 4.5:1 H1, H2 page titles, hero headers, card titles
Form Field Borders Input bounding box, active focus outlines 3.0:1 Recommended 4.5:1 Text inputs, dropdown borders, checkboxes, radio rings
Actionable UI Icons Standalone icon buttons (cart, search, menu) 3.0:1 Recommended 4.5:1 Navigation hamburger, close modal X, pagination arrows
Incidental / Inactive Text Disabled buttons, decorative watermarks, logos Exempt (No requirement) Exempt Disabled greyed-out submit buttons, brand wordmarks

4. Color Vision Deficiencies (CVD) and Accessible Palette Strategy

Designing accessible color palettes requires accounting for how colors are perceived across the most common forms of color blindness:

  • Deuteranopia & Deuteranomaly (Green-blind / Green-weak): Affects roughly 6% of males. Individuals confuse green hues with warm taupes, browns, and reds.
  • Protanopia & Protanomaly (Red-blind / Red-weak): Affects roughly 2% of males. Red wavelengths appear dark grey or brown, substantially reducing perceived luminance.
  • Tritanopia & Tritanomaly (Blue-yellow blindness): Rare condition affecting less than 0.1% of the population, confusing blues with greens and yellows with light greys.
The Golden Rule of Inclusive UI: Never Rely Solely on Hue

When designing error banners, success notices, or system notifications, never communicate state with color alone. Always pair a color change (e.g., green for success, red for error) with a secondary visual indicator: a clear icon (such as a checkmark or exclamation triangle) or explicit textual description (e.g., "Error: Invalid postal code").

Frequently Asked Questions About Color Accessibility

No. Under WCAG 2.1 Success Criterion 1.4.3, text that is part of an official logo or brand name (such as wordmarks or trademarked iconography) has no contrast requirement. However, website navigation menus, footer links, and marketing slogans that appear adjacent to your logo must strictly comply.
WCAG 2.2 (officially released in late 2023) maintains all contrast ratios established in WCAG 2.1 (including the 4.5:1 normal text and 3:1 non-text rules), but adds specific new criteria for keyboard focus visibility (Criterion 2.4.11 Focus Not Obscured and Criterion 2.4.13 Focus Appearance). Focus appearance requires that keyboard focus indicators achieve a contrast ratio of at least 3:1 between the indicator and the unfocused state.
Default browser styles render placeholder text in very light grey (such as #757575 on white, which only scores 4.6:1, or even lighter #a0aec0 which drops below 2.5:1). Furthermore, placeholder text vanishes when the user starts typing, creating cognitive friction for users with memory impairments. Best practice is to use persistent <label> tags with 4.5:1+ contrast above inputs rather than relying on placeholder copy.
Yes, but you must calculate the composited color against whatever layer sits behind the translucent element. To test semi-transparent backgrounds with our tool, determine the final blended RGB color after alpha compositing (alpha * foreground + (1 - alpha) * background) and paste the resulting hexadecimal value into the checker.

Do you have a project in mind? Let’s Start...

Connect with our creative team today. We'll analyze your requirements and tailor the right strategy for your brand's growth.