Colour picker + WCAG contrast checker

Pick two colours, see them in HEX / RGB / HSL / OKLCH side-by-side, and instantly check WCAG AA and AAA contrast for normal and large text. Live preview, swap, and one-click nudge to a passing colour. Everything runs in your browser.

Foreground
HEX#0B0F1A
RGBrgb(11, 15, 26)
HSLhsl(224, 41%, 7%)
OKLCHoklch(17.0% 0.024 268.5)
Background
HEX#FAFAFA
RGBrgb(250, 250, 250)
HSLhsl(0, 0%, 98%)
OKLCHoklch(98.5% 0.000 0.0)
Live preview

The quick brown fox jumps over the lazy dog.

The quick brown fox jumps over the lazy dog. (16px bold)

The quick brown fox jumps over the lazy dog. (24px)

WCAG contrast18.33:1
AA Normal≥ 4.5:1
Pass
AA Large≥ 3:1 (≥18pt or ≥14pt bold)
Pass
AAA Normal≥ 7:1
Pass
AAA Large≥ 4.5:1
Pass
Curated palette

Click a swatch to set foreground; click bg below to set background.

Colour values stay in your browser.

How to use

  1. Pick your foreground (text) and background colours using the native colour wheels — or paste a HEX / rgb() / hsl() value into the text fields and the rest auto-fills.

  2. Read off all four representations of each colour: HEX for CSS, RGB for image editors, HSL for quick hue/lightness tweaks, and OKLCH for perceptually-uniform design-system tokens. Click any value to copy.

  3. Check the live preview to see how the pairing actually reads at 16px regular, 16px bold, and 24px — these are the real sizes your buttons, body copy, and headings will use.

  4. Glance at the contrast ratio and the four WCAG badges (AA Normal, AA Large, AAA Normal, AAA Large). Green = pass, red = fail.

  5. If you fail AA Normal, hit Find next passing colour to nudge the foreground's lightness until it crosses the 4.5:1 threshold — or click a swatch in the curated palette to try a new starting point.

Frequently asked questions

What's the difference between WCAG AA and AAA?
WCAG 2.1 defines two conformance levels for contrast. AA is the practical minimum required by most accessibility laws (ADA, EAA, Section 508, AODA): 4.5:1 for normal body text and 3:1 for large text. AAA is the stricter aspirational level: 7:1 for normal text and 4.5:1 for large text. Aim for AA everywhere; reach for AAA on critical reading surfaces (long-form article body, dense data tables, anything users will read for minutes at a time). Below 4.5:1 you will lose users with low vision, users in bright sunlight, users on cheap LCD panels with bad gamma, and users in dark mode at 3am.
What actually counts as 'large text' for the 3:1 threshold?
WCAG defines large text as 18 point or larger at regular weight, OR 14 point or larger at bold weight. In CSS pixel terms (the universal browser default of 1pt = 1.333 CSS px), that's roughly 24px regular and 18.66px bold. The looser 3:1 threshold exists because larger glyphs have more visible pixel area per stroke, so the eye can resolve them at lower contrast. Note that 'bold' here means a real CSS font-weight of 700 or higher — not just any visually-heavier font. If you're sitting at a paired headline of 18px medium (500), apply the normal-text 4.5:1 threshold, not the large-text 3:1.
Why is OKLCH gaining traction over HSL?
HSL was designed in the 1970s as a quick mathematical reshuffling of RGB — it's the same colour space wearing a different hat. The 'L' (lightness) channel in HSL is NOT perceptually uniform: an HSL yellow at 50% lightness looks dramatically brighter to the human eye than an HSL blue at 50% lightness, even though they have the same numeric L. That breaks design systems — you can't say 'every -500 token has the same lightness' because the eye disagrees. OKLCH is built on the OKLab perceptual colour space (Björn Ottosson, 2020) where equal numeric steps in L look like equal steps to a human. Two OKLCH colours with the same L look equally light regardless of hue. That makes OKLCH the right primitive for design tokens, accessible colour scales, and smooth gradients. CSS Color Level 4 added native oklch() support; all evergreen browsers ship it now.
What's the difference between 'perceptual' and 'mathematical' lightness?
Mathematical lightness is whatever a colour model's formula spits out — for HSL it's the simple average of the highest and lowest RGB channels. Perceptual lightness is what a human actually sees, calibrated against decades of psychophysical experiments (CIE Lab, OKLab, CAM16). The two diverge most dramatically for highly saturated colours: a pure yellow (#ffff00) has HSL lightness 50% but feels nearly as bright as white (perceptual L ≈ 97); a pure blue (#0000ff) also has HSL lightness 50% but feels almost as dark as black (perceptual L ≈ 32). That's a 65-point perceptual gap between two colours the HSL model calls identical-lightness. WCAG contrast uses a luminance formula that's closer to perceptual; OKLCH's L is fully perceptual. If you're building a colour ramp that needs to look balanced, use OKLCH and set L explicitly.
What are the common contrast gotchas to watch out for?
White text on yellow CTA buttons is the canonical disaster — white-on-#ffd400 sits at about 1.5:1, three times worse than required. Switch the text to near-black (#0b0f1a on #ffd400 is ≈ 12:1) and you can keep the brand colour. Other recurring traps: light-grey placeholder text on white inputs (often 2.5:1 — invisible to anyone over 50); pale-blue links on white (#3b82f6 on white is only 3.6:1 — fine for large text, fails for body); the 'subtle' grey footer (#888 on white is 3.5:1 — fails AA for body); transparency-on-busy-photos (the worst-case pixel often fails, not the average); and dark-mode 'pure white' text on pure black (the high contrast actually causes halation for some users — drop the foreground to #e5e5e5 or so for comfort). Always test the worst-case pairing, not the average.

Need AI implementation? Book a call.

We’re the studio behind these tools — eight productized AI engagements for SMBs (leads, automation, receptionist, support, content, more). If you want something built for production, we’ll quote it.

Schedule A Call