Skip to content
Design Tool·Interactive Tool··

Palette & Contrast Pixel Lab

How can developers check WCAG AA/AAA colour contrast ratios live for light and dark UI tokens?

Tool Summary

Enter any foreground and background hex colour to compute real WCAG relative luminance contrast ratios (4.5:1 AA / 7:1 AAA) with a live editorial & pixel-art preview.

Colour Controls

WCAG Contrast Ratio

9.90:1AAA Pass
Live Preview

Clean contrast keeps digital spaces calm to read.

Body copy, subtle hairline rules, and pixel objects should remain legible in both day and night themes.

fg: #1D4234 · bg: #F4F1EA

Problem Solved & Contracts

Switching between separate contrast calculator tabs and design token files slows down theme tuning when building dual light/dark interfaces.

Inputs
Two 6-digit hex strings (`foreground`, `background`) via picker or text input.
Outputs
WCAG contrast ratio (`X.XX:1`), AA/AAA badge, and live themed card preview.
Example
Foreground: #1D4234 · Background: #F4F1EA -> Output: 10.67:1 (AAA Pass)
  1. Pick or paste foreground and background hex colours.
  2. Switch between preset day/night token pairs or test custom brand colours.
  3. Verify AA (4.5:1+) or AAA (7.0:1+) legibility before committing CSS tokens.

Notes, Limitations & Related Work

Built while tuning light and dark Bento themes for this digital playground. Pick or enter any foreground and background hex colour to compute real relative luminance contrast (AA / AAA) and preview it on crisp pixel-art & editorial typography.

Known Limitations

  • Evaluates 6-digit opaque sRGB hex colours only; semi-transparent RGBA/OKLCH alpha blending is not computed.
  • Body vs large-text threshold guidance defaults to standard 4.5:1 AA / 7:1 AAA body copy ratios.