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.
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.
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:
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.92Else → C_linear = ((C_srgb + 0.055) / 1.055)^2.4Weight linear channels using the CIE 1931 standard photopic spectral sensitivity coefficients:
L = 0.2126 * R_linear + 0.7152 * G_linear + 0.0722 * B_linearNote: Green accounts for ~71.5% of perceived luminance, while Blue accounts for only ~7.2%.
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:1against 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:1relative to their unfocused states and adjacent backgrounds. - Informative Graphics: Standalone icons, pie charts, and data graphs must sustain
3.0:1to convey meaning without relying solely on color hue.
Accessibility & Typography Navigation
- Need granular font-size checks? Switch to our dedicated tool to audit specific body and heading typography contrast.
- Interested in modern perceptual models? Explore our calculator to test next-generation APCA perceptual contrast designed for WCAG 3.0.
- Using multi-tone typography? Use our generator to verify gradient text readability across dark and light background surfaces.
- Need to select or sample new interface colors? Use our interactive color picker to fine-tune hues before auditing contrast ratios.
- Building a complete UI color scale? Jump over to generate accessible Tailwind palettes with uniform perceptual stepping from shade 50 to 950.
Frequently Asked Questions
What is the minimum WCAG 2.1 and 2.2 contrast ratio for normal body text?
What qualifies as 'Large Text' under WCAG guidelines?
How does the relative luminance formula handle gamma correction?
What are the non-text contrast requirements under WCAG Criterion 1.4.11?
Related Design & Color Instruments
Color Blindness Simulator
Simulate Protanopia, Deuteranopia, Tritanopia, and Achromatopsia on colors and uploaded UI screenshots via 3x3 matrices.
APCA Contrast Calculator
Calculate readability contrast using WCAG 3.0 Accessible Perceptual Contrast Algorithm (APCA) Lc scores.
Text Contrast Checker
Evaluate legibility compliance specifically for body text (4.5:1 ratio) and large headings (3:1 ratio).
Image Color Picker
Extract pixel colors from your images with pixel-level precision and an interactive magnifying loupe. Runs 100% locally in your browser.