Skip to main content

Colour Picker and Contrast Checker

Pick a colour and read it as HEX, RGB and HSL, then check its contrast against another colour for WCAG text and UI rules.

Colours

Text colour in each format

  • HEX#17203a
  • RGBrgb(23, 32, 58)
  • HSLhsl(225, 43%, 16%)

Result

Contrast ratio
13.05:1
AA, body text
Pass

Passes every text check, AAA included.

Preview

Large text, 24px

The quick brown fox jumps over the lazy dog.

WCAG 2.2 checks

WCAG contrast checks for the two colours
AA, body textPassneeds 4.5:1
AA, large textPassneeds 3:1
AAA, body textPassneeds 7:1
AAA, large textPassneeds 4.5:1
Icons and controlsPassneeds 3:1

Runs in your browser; nothing you enter leaves this page.

How it works

Reading a colour

Type #rgb, #rrggbb, rgb() or hsl() and the other forms update. HSL describes a colour as hue, saturation and lightness, which is the easiest to adjust by hand.

The contrast check

Contrast is the ratio of the lighter colour’s relative luminance to the darker one’s, from 1 to 21. WCAG 2.2 asks for 4.5 for normal text at level AA and 7 at AAA, 3 for large text and for UI components, and 4.5 for large text at AAA.

ratio = (L₁ + 0.05) ÷ (L₂ + 0.05)

More tools

All 238 tools