Color Palette & Contrast Checker
Build palettes and validate WCAG 2.1 contrast (AA/AAA). Click a swatch to apply to the current foreground (FG) or background (BG).
Palette Builder
Pick a base color and scheme. Each swatch shows tints β base β shades. Use the βApply to FG/BGβ pills to decide where a swatch goes when you click it.
Base color
Scheme
Steps (tints/shades)
Contrast Checker
AA requires 4.5:1 for normal text and 3.0:1 for large text (β₯24px normal or β₯18.66px bold). AAA is stricter: 7.0:1 normal and 4.5:1 large.
Foreground
Background
Sample text
Font size (px)
Weight
Contrast: β
AA Normal: β
AA Large: β
AAA Normal: β
AAA Large: β
Preview text
Badge
Table: palette colors vs. current background
| Color | Hex | Ratio | AA N | AA L | AAA N | AAA L |
|---|
What these numbers mean
- Contrast uses sRGB relative luminance (Y) with
(Llight+0.05)/(Ldark+0.05). - βLargeβ text = β₯24px normal, or β₯18.66px bold.
- WCAG AA/AAA thresholds: 4.5/7.0 for normal; 3.0/4.5 for large.
- Copy CSS exports
--color-fg,--color-bg, and the first 12 palette colors as--color-01..12.