Color Picker

Pick a color, convert formats and check contrast.

#3B82F6
Values
HEX
#3B82F6
RGB
59, 130, 246
Complement
#C47D09
Contrast Ratio (WCAG)
vs White3.68 : 1
vs Black5.71 : 1 AA ✓
Recommended textBlack

Convert between HEX, RGB and HSL, and check WCAG contrast ratios so text stays readable for people who are not you.

Why contrast is a requirement, not a preference

WCAG defines two thresholds. AA requires a contrast ratio of 4.5:1 for normal text and 3:1 for large text, defined as 18pt or 14pt bold. AAA raises those to 7:1 and 4.5:1.

Roughly one in twelve men has some form of colour vision deficiency. A grey-on-grey design that looks refined to you can be unreadable to a meaningful fraction of visitors, and contrast is the one accessibility property that is cheap to fix and easy to measure.

The three colour models

HEX is a compact notation for RGB, written as six hexadecimal digits. It is what designers paste into CSS. RGB matches how screens emit light. Neither is intuitive to adjust: to make a blue lighter you have to guess at three numbers.

HSL describes hue as an angle, saturation as a percentage and lightness as a percentage. Lightening a colour becomes a single number change, which is why design systems are usually built on HSL or on a perceptual space like OKLCH.

Perceived lightness differs from computed lightness

A pure yellow and a pure blue can share the same HSL lightness value while looking wildly different in brightness, because the eye is far more sensitive to green and yellow than to blue.

That is why contrast ratios are computed from relative luminance rather than from HSL. If two colours look similar in brightness but fail contrast, the luminance formula is right and your eye is being fooled by hue.

Frequently asked questions

What ratio do I need for body text?
4.5:1 for AA. For small grey secondary text, which is where most sites fail, check it explicitly rather than assuming.
Why does my contrast pass in one tool and fail in another?
Usually a difference in which two colours are being compared — text against the actual background, not against white. Semi-transparent backgrounds are the other common cause.
Can I get a palette from one colour?
This tool converts and checks contrast. For palette generation, work in HSL and vary lightness while holding hue steady.