Hex ↔ RGB Color Converter

Convert between HEX, RGB, and HSL. Includes WCAG contrast checker, color harmonies, shade generator, and named color lookup.

RGB

Red
Green
Blue
rgb(59, 130, 246)

HSL

Hue
°
Saturation
%
Lightness
%
hsl(217, 91%, 60%)

CSS Snippet

color: #3b82f6;
background-color: #3b82f6;
border-color: #3b82f6;
/* rgb */
color: rgb(59, 130, 246);
/* hsl */
color: hsl(217, 91%, 60%);

WCAG Contrast Ratio

vs White3.68:1
AAAA LargeAAAAAA Large
Sample Text
vs Black5.71:1
AAAA LargeAAAAAA Large
Sample Text

AA — Minimum contrast for normal text (≥ 4.5:1)

AA Large — Minimum for large text / UI components (≥ 3:1)

AAA — Enhanced contrast for normal text (≥ 7:1)

AAA Large — Enhanced for large text (≥ 4.5:1)

Color Harmonies

Complementary

#3b82f6base
#f6af3c

Triadic

#3b82f6base
#f63c83
#83f63c

Analogous

#3b82f6base
#523cf6
#3ce0f6

Split-Complementary

#3b82f6base
#f6523c
#e0f63c

Click any swatch to apply that color.

Shades (same hue & saturation)

10%
20%
30%
40%
50%
60%
70%
80%
90%

All conversions happen in your browser. No data is sent to any server.