WCAG 2.2 Color Contrast Checker

Test color accessibility compliance for normal text, large headings, and digital UI components.

Calculated Ratio
17.85:1

✓ Great contrast for readable text in production UI.

PASS
WCAG AA
Body Text
PASS
WCAG AAA
Enhanced
Normal TextReq: 4.5:1
Large Text (18pt+)Req: 3.0:1
AAA Strict TextReq: 7.0:1
UI Icons & InputsReq: 3.0:1

Real UI Component Simulation

This preview sandbox renders directly using your chosen Foreground and Background colors.

Accessible Headline Typography

Web accessibility ensures that websites, tools, and technologies are designed and developed so that people with disabilities can use them effectively. Good color contrast benefits everyone under direct sunlight or reduced screen brightness.

Tag: #0F172A
Web Content Accessibility Guidelines (WCAG 2.2) Standard

The Definitive Guide to Color Contrast & Digital UI Accessibility

Digital accessibility is both a legal requirement and an ethical cornerstone of modern software development. Ensuring that text, interactive controls, and visual data meet WCAG 2.2 contrast standards guarantees that your applications remain legible and usable for over 2.2 billion people worldwide living with visual impairments, aging vision, color vision deficiencies, and situational constraints like direct outdoor sunlight.

WCAG 2.2 Compliance Levels & Strict Thresholds

The World Wide Web Consortium (W3C) establishes three distinct tiers of accessibility conformance. Here is how our automated contrast analyzer audits your color pairings:

Level AA — MinimumSC 1.4.3
4.5 : 1
Standard Body Typography

Mandatory legal standard across the US (ADA Title II & Section 508), European Union (EN 301 549 & European Accessibility Act), and international regulations. Applies to all text below 18pt regular or below 14pt bold.

Level AA — UI & Large TextSC 1.4.11
3.0 : 1
Headings, Buttons & Form Inputs

Required for large typography (18pt+ regular or 14pt+ bold), clickable icon buttons, focus indicator rings, active checkboxes, radio buttons, and essential data chart borders against adjacent canvases.

Level AAA — EnhancedSC 1.4.6
7.0 : 1
High-Legibility Enhanced Tier

The gold standard for medical software, government administrative portals, public transit interfaces, and long-form editorial reading platforms requiring maximum visual clarity under extreme ambient glare.

The Mathematical Science of Relative Luminance & Contrast Ratio

Why can two visually bright colors like pure yellow (#FFFF00) and pure green (#00FF00) have radically different contrast scores when paired against white? The answer lies in human photoreceptor biology, encoded through the CIE 1931 colorimetric model.

Gamma Expansion & Linearization

Digital screens store non-linear gamma-compressed sRGB values. To calculate true photon intensity, values must be linearized:

C_linear = (C_sRGB / 255 <= 0.04045) ? (C_sRGB / 255) / 12.92 : Math.pow((C_sRGB / 255 + 0.055) / 1.055, 2.4)
Spectral Weighting & Contrast Ratio

Green light stimulates human retinal cones far more than red or blue. Once luminance is calculated, the contrast ratio is derived:

L = 0.2126 * R_lin + 0.7152 * G_lin + 0.0722 * B_lin Contrast_Ratio = (L_lighter + 0.05) / (L_darker + 0.05)

Because green contributes 71.5% of total perceived luminance while blue contributes only 7.2%, pure blue (#0000FF) has a luminance of only 0.072 (yielding an excellent 8.6:1 contrast against white), while pure cyan (#00FFFF) has a luminance of 0.787 (yielding a failing 1.25:1 contrast against white).

Color Vision Deficiency (CVD) & Multi-Cue Visual Design

Approximately 8% of men and 0.5% of women worldwide experience some form of color blindness. Designing accessible interfaces requires understanding how chromatic information is perceived across different visual spectra:

Protanopia & Protanomaly

Red-Blind Spectrum

Absence or mutation of L-cones (long-wavelength red receptors). Red hues appear dark brown or charcoal; greens, yellows, and oranges merge into murky yellow-browns.

Deuteranopia & Deuteranomaly

Green-Blind Spectrum

Most common form of CVD. Absence of M-cones (medium-wavelength green receptors). Confuses red, green, and brown; bright green and yellow merge into sandy tans.

Tritanopia & Tritanomaly

Blue-Yellow Spectrum

Rare deficiency affecting S-cones (short-wavelength blue receptors). Blue appears greenish-cyan; yellow and violet appear pinkish-grey or light grey.

Achromatopsia

Total Monochromacy

Complete lack of functioning retinal cone cells. Vision is entirely monochrome based on pure luminance differences and rod cells.

Step-by-Step Strategies to Fix Failing Contrast Ratios

If your brand color fails WCAG AA against your canvas background, you do not need to sacrifice brand identity. Follow these proven design engineering solutions:

Tonal Shade Stepping

Shift Down the 9-Step Ramp

Use our Shades & Tints Tool to step from a 500-level brand tone down to a 700 or 800 shade for text, preserving your brand hue while passing AA (4.5:1).

Inverted Surface Roles

Solid Button Background

Instead of using a light brand color for body text, use it as a solid pill background with high-contrast white or dark typography inside it.

Typography Size Scaling

Leverage the 3:1 Threshold

Increase typography sizing to 18pt (24px regular) or 14pt (18.66px bold). Under WCAG SC 1.4.3, large text only requires a 3.0:1 ratio.

Explore Connected Color Suite Tools

Streamline your accessibility workflow across our suite of color design utilities:

WCAG Contrast & Accessibility FAQs

Clear, authoritative answers to common questions regarding WCAG 2.2 contrast compliance, legal standards, and digital accessibility.

What is the WCAG 2.2 color contrast requirement for digital products?
Under the Web Content Accessibility Guidelines (WCAG 2.2), Level AA requires a minimum contrast ratio of 4.5:1 for standard body text (under 18pt regular or under 14pt bold) and 3.0:1 for large text (18pt+ regular or 14pt+ bold) as well as essential user interface components (such as form field borders, toggle states, and clickable icons). Level AAA mandates an enhanced ratio of 7.0:1 for body text and 4.5:1 for large text.
How is relative luminance mathematically calculated in sRGB?
Relative luminance (L) measures the perceived brightness of a color normalized between 0 (pure black) and 1 (pure white). It converts 8-bit sRGB channels (0–255) to linear floats through gamma expansion: if channel/255 <= 0.04045, Linear = (channel/255) / 12.92; otherwise Linear = ((channel/255 + 0.055) / 1.055)^2.4. Luminance is then computed as L = 0.2126*R_linear + 0.7152*G_linear + 0.0722*B_linear, matching human retinal cone sensitivity.
What is the mathematical formula for the WCAG contrast ratio?
The contrast ratio is calculated as (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. The addition of 0.05 accounts for ambient light reflecting off physical display glass. Ratios range from 1:1 (zero contrast, identical colors) to 21:1 (maximum contrast between pure white #FFFFFF and pure black #000000).
What is WCAG Success Criterion 1.4.11 for Non-Text Contrast?
Success Criterion 1.4.11 requires a minimum contrast ratio of 3:1 for user interface components and graphical objects essential for understanding content. This includes form input borders, checkboxes, radio buttons, navigation focus rings, tabs, active switch indicators, and data visualization chart lines/slices against their adjacent backgrounds.
Why is high contrast alone not enough for color-blind users (SC 1.4.1)?
WCAG Success Criterion 1.4.1 (Use of Color) dictates that color must never be the sole visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. For example, form error states must include an error icon or explicit text label in addition to a red border, ensuring users with red-green color blindness (Protanopia and Deuteranopia) can perceive the validation state.
What is APCA (Accessible Perceptual Contrast Algorithm) in WCAG 3?
APCA is the modern candidate contrast method developed for future WCAG 3 (Silver) guidelines. Unlike WCAG 2.2 simple ratio math, APCA models spatial frequency, text font weight, size, background polarity (light-on-dark vs. dark-on-light halation), and human optical non-linearities to calculate a Lightness Contrast value (Lc) that accurately predicts human reading speed and comprehension.
Why should designers avoid pure black (#000000) on pure white (#FFFFFF) in dark mode?
While pure black (#000000) on pure white (#FFFFFF) achieves the maximum theoretical 21:1 ratio, extreme contrast can cause visual halation (glowing blur) and eye fatigue, particularly for users with astigmatism reading on OLED displays. Modern dark mode best practices recommend deep slate or charcoal surfaces (such as #0F172A or #121826) with off-white typography (such as #F1F5F9).
How can I fix a color pairing that fails WCAG AA contrast?
If your color combination fails, you can: 1) adjust the lightness or saturation using our Color Picker to deepen the text or lighten the background, 2) generate tonal tints and shades with our Shades and Tints Tool to find an adjacent compliant step, or 3) increase font weight and size above 18pt/14pt bold to meet the lower 3:1 Large Text threshold.