GamutDesk Logo
GamutDesk

WCAG Color Contrast Checker

Free browser-native color contrast checker per WCAG 2.1 and 2.2 standards. Calculate exact relative luminance ratios for text and UI components with client-side processing.

Client-Side ArchitecturePrivate Client-Side Processing
Contrast Ratio
17.85:1
≥ 4.5:1
PASS
AA Normal Text
≥ 3.0:1
PASS
AA Large Text
≥ 7.0:1
PASS
AAA Normal Text
≥ 4.5:1
PASS
AAA Large Text
Live Typography & Interface Simulation

Large Headline (18pt+ bold / 24pt+)

This is normal body text (14-16px). Accessible design requires sufficient contrast against the background so readers with low visual acuity can consume content without fatigue.

Text hyperlink example

Technical Specification & Mathematical Principles

W3C Relative Luminance & Contrast Ratio Mathematical Formula

The World Wide Web Consortium (W3C) defines contrast ratio based on the relative luminance of two colors rendered in standard sRGB color space (IEC 61966-2-1). The mathematical process follows three sequential steps:

Step 1: sRGB Channel Linearization (Gamma Decompanding)

Convert integer byte color channels [0, 255] to linear photometric energy values:

C_srgb = C / 255  [for C ∈ {R, G, B}]
If C_srgb ≤ 0.04045 → C_linear = C_srgb / 12.92
Else → C_linear = ((C_srgb + 0.055) / 1.055)^2.4
Step 2: Photopic Relative Luminance (L)

Weight linear channels using the CIE 1931 standard photopic spectral sensitivity coefficients:

L = 0.2126 * R_linear + 0.7152 * G_linear + 0.0722 * B_linear

Note: Green accounts for ~71.5% of perceived luminance, while Blue accounts for only ~7.2%.

Step 3: Relative Luminance Contrast Ratio

Compute the ratio of lighter luminance (L1) to darker luminance (L2), adding a 0.05 flare offset:

Ratio = (L1 + 0.05) / (L2 + 0.05)  [where L1 ≥ L2]

Resulting values range from 1:1 (identical colors) up to 21:1 (pure black on pure white).

Client-Side Precision vs. Enterprise Audit Suites

Unlike cloud-hosted accessibility suites that transmit design tokens and color pairs over network APIs, GamutDesk executes all colorimetry and CIE luminance transformations entirely inside browser memory. Calculations run with sub-millisecond client-side execution, zero third-party telemetry on sensitive branding palettes, and zero server-side data retention.

WCAG 2.1 vs. WCAG 2.2 Non-Text Contrast Requirements

While WCAG Success Criterion 1.4.3 governs text contrast (requiring 4.5:1 for body copy and 3:1 for large text), Success Criterion 1.4.11 (Non-text Contrast) expands requirements to interface components:

  • UI Controls: Visual boundaries of buttons, checkbox outlines, and input fields require at least 3.0:1 against adjacent background surfaces.
  • State Indicators: Active, selected, and focused borders (including keyboard focus rings clarified in WCAG 2.2 Criterion 2.4.11) must maintain 3.0:1 relative to their unfocused states and adjacent backgrounds.
  • Informative Graphics: Standalone icons, pie charts, and data graphs must sustain 3.0:1 to convey meaning without relying solely on color hue.

Accessibility & Typography Navigation

Frequently Asked Questions

What is the minimum WCAG 2.1 and 2.2 contrast ratio for normal body text?
Level AA requires a minimum contrast ratio of 4.5:1 for normal text (under 18pt or under 14pt bold). Level AAA requires a stricter 7:1 ratio.
What qualifies as 'Large Text' under WCAG guidelines?
Large text is defined as at least 18pt (typically 24px) regular font weight, or 14pt (typically 18.66px) bold font weight. For large text, Level AA requires 3:1 and Level AAA requires 4.5:1.
How does the relative luminance formula handle gamma correction?
The formula first decodes non-linear sRGB values to linear photometric luminance using IEC 61966-2-1 power laws (exponent 2.4) before weighting channels by human photopic luminous efficiency (0.2126 Red + 0.7152 Green + 0.0722 Blue).
What are the non-text contrast requirements under WCAG Criterion 1.4.11?
User interface components—such as form input borders, active button outlines, and graphic chart elements—require a minimum contrast ratio of 3:1 against adjacent background surfaces.

Related Design & Color Instruments