WCAG 2.1 (AA / AAA) Color Contrast Checker & Picker

Select background and text colors, verify contrast ratio according to WCAG 2.1 AA and AAA standards, and preview real-time accessibility compliance.

🎨 Select Background Color

QUICK BG PRESETS:

✍️ Select Text Color

QUICK TEXT PRESETS:
Contrast Ratio:
17.85 : 1
EXCELLENT! (WCAG AAA)
APCA WCAG 3.0 Perceptual Lightness (Lc): Lc 102.6 (Dark-on-Light)
Relative Luminance (L = 0.2126R + 0.7152G + 0.0722B): BG L=1.0000 | TXT L=0.0088

WCAG 2.1 Compliance Summary:

WCAG AA Normal Text (< 18pt) (≥ 4.5:1) ✓ PASS
WCAG AA Large Text (≥ 18pt) (≥ 3.0:1) ✓ PASS
WCAG AAA Normal Text (< 18pt) (≥ 7.0:1) ✓ PASS
WCAG AAA Didelis tekstas (≥ 18pt) (≥ 4.5:1) ✓ PASS
UI Components & Icons (≥ 3.0:1) ✓ PASS
Inline Links vs. Surrounding Text (≥ 3.0:1) ✓ PASS

👁️ Live Preview:

Sample Heading (18pt / 24px)

This paragraph shows how your chosen text and background combination will look on a real site.

Action Button Badge

W3C WCAG 2.1 / 2.2 & APCA WCAG 3.0 Accessibility Contrast Threshold Reference Table

W3C Criterion / Level UI / Typography Element Minimum Ratio (WCAG 2.x) Target APCA Lc (WCAG 3.0)
1.4.3 Contrast (Minimum) — Level AA Normal Body Text (< 18pt / 24px regular, < 14pt / 18.66px bold) 4.5 : 1 |Lc| ≥ 75 (16px) / |Lc| ≥ 60 (24px)
1.4.3 Contrast (Minimum) — Level AA Large Large Headings & Display Text (≥ 18pt / 24px or ≥ 14pt / 18.66px bold) 3.0 : 1 |Lc| ≥ 60 (Headings) / |Lc| ≥ 45 (36px+)
1.4.6 Contrast (Enhanced) — Level AAA Enhanced Normal Body Text (Medical, Legal, Long-Form Reading) 7.0 : 1 |Lc| ≥ 90 (Fluent Reading Body Copy)
1.4.6 Contrast (Enhanced) — Level AAA Large Enhanced Large Headings & Subtitles (Level AAA) 4.5 : 1 |Lc| ≥ 75
1.4.11 Non-Text Contrast — Level AA Non-Text UI Components, Input Borders, Focus Rings & SVG Icons 3.0 : 1 |Lc| ≥ 45 (Large UI) / |Lc| ≥ 60 (Fine Icons)

What This WCAG Color Contrast Checker Does

This accessibility checker calculates the luminance contrast ratio between any foreground text color and background color in real time according to W3C WCAG 2.1 / 2.2 and APCA (WCAG 3.0 Perceptual Lightness Lc) formulas. Both the Background and Text color panels provide an interactive 2D saturation-brightness spectrum canvas, a 360° hue slider, native OS color pickers, synchronized HEX, RGB, HSL, and CMYK input fields, and 6 quick color presets.

The live scoreboard displays the exact contrast ratio (from 1.00 : 1 to 21.00 : 1), relative luminance values (L = 0.2126R + 0.7152G + 0.0722B), the APCA perceptual score (Lc), and individual Pass/Fail badges for 6 accessibility thresholds: WCAG AA Normal Text (≥ 4.5:1), WCAG AA Large Text (≥ 3.0:1), WCAG AAA Normal Text (≥ 7.0:1), WCAG AAA Large Text (≥ 4.5:1), UI Components & Icons (≥ 3.0:1), and Inline Links (≥ 3.0:1). If a color pair fails, you can click Auto-Fix (4.5:1 AA) or Auto-Fix (7.0:1 AAA) to automatically adjust lightness while preserving hue and saturation, swap colors, preview live typography and buttons, or copy the pair as CSS custom properties (:root variables).


Chromatic Chromatophobia: Why Modern Web Design Forgot Legibility

Let's be honest: modern web design is suffering a genuine aesthetic dead-end crisis. Designers, intoxicated by minimalist gray shades, love creating websites with light gray `#999999` text sitting on an even lighter `#F5F5F5` gray background. The result? The website looks like an elegant monument to Zen philosophy, but it is impossible to read even with 20/20 vision under bright sunlight.

This is where the W3C WCAG 2.1 (Web Content Accessibility Guidelines) standard steps in. It is not cold bureaucracy — it is the constitution of digital accessibility. It establishes clear boundaries between artistic vanity and practical legibility, ensuring everyone can read vital content regardless of visual acuity or screen brightness.


Why Do We Need This? Does Low Contrast Ruin Eyesight, and What About Logos?

Let's be real: squinting at pale gray text on a gray background triggers genuine physiological harm — digital eye strain (asthenopia). In front of a bright screen, the ciliary muscle in the eye over-exerts itself trying to resolve fuzzy boundaries, leading to tension headaches, dry eye syndrome, and visual fatigue. But what about logos or deliberate low-contrast branding? The W3C WCAG 2.1 specification includes an explicit exemption: logos and registered brand marks are exempt from contrast rules as artistic expressions. However, if your body text or call-to-action buttons are intentionally blurry "to attract attention", the exact opposite will occur: 80% of users will bounce within 3 seconds, Google algorithms will downgrade your SEO rank for poor user experience, and you risk accessibility compliance lawsuits. Artistic rebellion is fine, but unreadable text simply destroys your conversion rate.


Who Invented WCAG? Sir Tim Berners-Lee, the W3C, and the Genesis of Accessibility

WCAG is not the invention of a single designer or solitary enthusiast — it is the landmark creation of the W3C (World Wide Web Consortium) and its dedicated division, the WAI (Web Accessibility Initiative). The genesis of this global standard traces back to 1994, when the inventor of the World Wide Web, Sir Tim Berners-Lee, founded the W3C with a foundational maxim: "The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect." The first official recommendation, WCAG 1.0, was published in May 1999, followed by the tech-neutral WCAG 2.0 in December 2008. Finally, in June 2018, the W3C unveiled WCAG 2.1, specifically addressing mobile devices, low-vision reflow, and precise contrast metrics. Today, WCAG compliance is enshrined in European Union law (EN 301 549) and US federal regulations (ADA / Section 508), turning scientific color contrast into a strict legal obligation for digital platforms.


Mathematical Methodology: Step-by-Step Contrast Calculation

The WCAG contrast ratio is not calculated by simply subtracting raw RGB channel numbers — human vision perceives brightness non-linearly. The official W3C methodology follows three precise mathematical steps:

  1. Step 1 – Gamma Correction (Linearization): Each R, G, B channel (0 to 255) is normalized to a 0–1 scale (c = val / 255). If c ≤ 0.04045, a linear scaling is applied (clin = c / 12.92), otherwise power-law gamma expansion is performed: clin = ((c + 0.055) / 1.055)2.4.
  2. Step 2 – Relative Luminance (L): Photometric relative luminance is derived using ISO constants: L = 0.2126 × Rlin + 0.7152 × Glin + 0.0722 × Blin. Pure white yields L = 1.0, while pure black yields L = 0.0.
  3. Step 3 – Final Ratio Formula: The lighter luminance (L1) and darker luminance (L2) are evaluated using the official equation: Ratio = (L1 + 0.05) / (L2 + 0.05). The +0.05 offset accounts for ambient light glare on display surfaces. The resulting value ranges strictly from 1:1 (zero contrast) to 21:1 (maximum black on white contrast).

So who was the genius that came up with these cosmic equations? This "cosmic" formula is not the work of a single eccentric academic — it is the synthesis of 1931 photometric research by the CIE (Commission Internationale de l’Éclairage), the 1996 sRGB standard created by Microsoft & HP engineers, and W3C accessibility pioneer Dr. Gregg Vanderheiden. They mapped the human retina's spectral sensitivity (where green dominates due to our ancestors surviving in lush jungles) into a cold, unyielding mathematical constant, ensuring no UI designer could ever again excuse illegibility with "Well, it looks pretty to me!"


From the perspective of quantum optics and electromagnetic physics, color does not objectively exist — it is merely a stream of photons vibrating at specific wavelengths, transformed by human retinal cone photoreceptors into electrochemical signals in the visual cortex. Yet, modern digital design seems to have unilaterally renounced Newtonian optics and millions of years of biological evolution. Immersed in a form of chromatic nihilism, designers intentionally craft pale gray `#A0A0A0` typography over off-white `#F4F4F4` backgrounds, as if every web user possessed superhuman ultraviolet vision or operated exclusively inside a subterranean bunker. It is an absurd aesthetic atrophy: fundamental physical light energy suppressed in the name of ephemeral minimal fashion.

When the W3C committee established the WCAG 2.1 accessibility algorithms, they relied not on subjective taste, but on the unyielding photometric formula for relative luminance: L = 0.2126 × R + 0.7152 × G + 0.0722 × B. Green photons account for 71.5% of human perceived brightness, while blue accounts for a mere 7.2%. Ignoring these physical constants is akin to building a suspension bridge while discarding structural mechanics. Our WCAG Color Contrast Checker acts as an implacable referee of digital physics: stripped of corporate pretension, it reveals whether your contrast is truly legibly scientific or an illegible optical disaster.


What Does the WCAG 2.1 Contrast Ratio Mean?

Contrast ratio is measured on a scale from 1:1 (identical colors, total illegibility) to 21:1 (maximum contrast between pure black and pure white). The W3C standard defines three main compliance tiers:

1. WCAG AA Level (Minimum Legal & Professional Standard)

  • Normal Text (< 18pt / 24px): Requires a contrast ratio of at least 4.5 : 1. (Status: PASS / GOOD).
  • Large Text (≥ 18pt / 24px or ≥ 14pt bold): Requires a contrast ratio of at least 3.0 : 1.
  • UI Components & Icons: Requires a contrast ratio of at least 3.0 : 1.

2. WCAG AAA Level (Enhanced Accessibility Standard)

  • Normal Text: Requires a contrast ratio of at least 7.0 : 1 (Status: EXCELLENT / OPTIMAL).
  • Large Text: Requires a contrast ratio of at least 4.5 : 1.

3 Simple Steps to Test Color Contrast

  1. Select Background Color: Pick a background color using the color wheel, 2D spectrum canvas, or type HEX/RGB/HSL/CMYK values.
  2. Select Text Color: Choose or enter a text color in the second card.
  3. Get Instant Grade: The engine calculates relative luminance, displays the prominent ratio (e.g. 7.4 : 1), and issues a clear verdict: EXCELLENT!, GOOD!, or FAIL!.
  4. Try 1-Click Auto-Fix: If contrast fails, click Auto-Fix to automatically adjust text lightness until it meets the 4.5:1 AA threshold.

FAQ (Frequently Asked Questions)

What is considered a good contrast ratio (WCAG AA)?

For standard body text, the minimum allowed contrast ratio is 4.5 : 1. For large text (≥ 18pt) or bold text (≥ 14pt), a ratio of 3.0 : 1 is sufficient.

What is the difference between WCAG AA and AAA?

Level AA is the standard legal requirement for government and commercial websites worldwide.
Level AAA is an enhanced accessibility level requiring at least 7.0:1 contrast for normal text.

How is relative luminance calculated?

Relative luminance is calculated per W3C ISO specifications: L = 0.2126 × R + 0.7152 × G + 0.0722 × B with sRGB gamma correction.

Does this tool help make sites accessible to visually impaired users?

Yes! Ensuring sufficient contrast guarantees your content remains legible for users with low vision, color blindness, or those viewing screens under outdoor glare.

What is APCA (WCAG 3.0 Lc) and how does 1-Click Auto-Fix work?

APCA (Accessible Perceptual Contrast Algorithm) is the next-generation WCAG 3.0 contrast model that measures perceptual lightness contrast (Lc from -108 to +106) accounting for polarity (dark-on-light vs. light-on-dark). Our 1-Click Auto-Fix preserves your original Hue and Saturation while solving for the exact HSL Lightness needed to pass 4.5:1 (AA) or 7.0:1 (AAA).