Design & Accessibility Desk

Color Palette Studio & WCAG Contrast Checker

Build 1–10 harmonious swatches, lock picks, inspect WCAG 2.1 contrast ratios, and press Space to regenerate.

Export Design Tokens


          

WCAG 2.1 Thresholds

AAA Enhanced≥ 7.0 : 1
AA Normal Text≥ 4.5 : 1
AA Large / UI≥ 3.0 : 1
How It Works & Methodology

HEX, RGB & HSL Color Models, Harmony Geometry & WCAG 2.1 Contrast

01 · Color Models

HEX, RGB & HSL Representations

Web displays mix additive Red, Green, and Blue light across 8-bit channels (0–255 per channel, or 16,777,216 total colors). A HEX code like #15803D is simply the base-16 shorthand of rgb(21, 128, 61).

Because raw RGB channels are unintuitive to shift harmoniously, EmverDeck converts your base color into cylindrical HSL (Hue 0–360°, Saturation 0–100%, Lightness 0–100%) so hue angle, vividness, and brightness can be adjusted independently.

02 · Color Theory

Harmonic Wheel Rules & Swatch Locking

Classical color harmonies distribute hues symmetrically around the 360° color wheel while staggering lightness steps across your 1–10 swatches:

Analogous: H ± 25° · Complementary: H + 180° · Triadic: H ± 120°

Split-Complementary (H + 150°, H + 210°) softens pure complementary tension, while Monochromatic holds Hue constant and varies Lightness. Lock any favorite swatch and press Space to iterate only unlocked slots.

03 · Accessibility

WCAG 2.1 Relative Luminance Formula

Every swatch automatically tests legible text contrast against white (#FFFFFF) and dark slate (#0F172A) using W3C sRGB gamma-linearized luminance:

L = 0.2126·R + 0.7152·G + 0.0722·B | Ratio = (L1 + 0.05) / (L2 + 0.05)

Because human photoreceptors weight green (71.5%) far more heavily than blue (7.2%), two colors with identical 50% HSL lightness can produce vastly different WCAG contrast scores.

Color Harmony & Model Quick Reference

HSL hue offsets and ideal UI use cases for each palette rule.

HSL · 360° WHEEL
Harmony Rule Hue Offsets Best Design Use Case
Analogous H, H±25°, H±50° Calm dashboards, gradients, and editorial themes
Complementary H, H+180° High-contrast primary CTA vs. accent highlights
Triadic H, H+120°, H+240° Distinct multi-series charts & status badges
Split-Complementary H, H+150°, H+210° Balanced contrast with less visual harshness
Monochromatic Fixed H, varied L Minimalist SaaS surfaces, borders, and hover states

WCAG 2.1 Contrast Compliance Reference

Minimum W3C accessibility contrast ratios for UI typography.

W3C WCAG 2.1
Level Element Type Min Ratio Worked Example Pair
AA Large Headings ≥ 24px (or ≥ 18.66px bold) & UI icons 3.0 : 1 #64748B on #FFFFFF (4.76:1 ✓)
AA Normal Standard body copy, form labels, table cells 4.5 : 1 #15803D on #FFFFFF (5.14:1 ✓)
AAA Large Enhanced readability headings 4.5 : 1 #BE123C on #FFFFFF (6.47:1 ✓)
AAA Normal High-contrast documentation & institutional UI 7.0 : 1 #0F172A on #FFFFFF (17.85:1 ✓)

Frequently Asked Questions

How is WCAG 2.1 color contrast ratio calculated?
WCAG 2.1 linearizes each 8-bit sRGB channel and computes relative luminance L = 0.2126R + 0.7152G + 0.0722B, then divides (L_lighter + 0.05) by (L_darker + 0.05). This produces a contrast ratio from 1:1 (identical colors) up to 21:1 (pure black on pure white), requiring at least 4.5:1 for AA normal text and 7.0:1 for AAA.
When should I export CSS variables vs. a JSON array?
Use Copy CSS Variables to paste directly into a :root stylesheet or Tailwind CSS v4 @theme block. Use Copy JSON when feeding color tokens into design-token pipelines, Figma plugins, or JavaScript chart libraries.
Why do bright yellows and light greens fail AA contrast with white text?
Human vision is heavily weighted toward green light (71.5%) and red light (21.3%). Bright yellow combines full red and green luminance (relative luminance above 0.85), leaving too small a luminance gap against white (1.0). Pair high-luminance swatches with dark slate text (#0F172A) instead.
How many swatches should a clean UI color system use?
Most production web applications work best with 3 to 5 semantic colors (primary brand, neutral surface, border, positive delta, and negative delta), while categorical data-visualization palettes typically need 6 to 10 distinct hues.