Color picker

Pick any color to get its HEX, RGB and HSL codes ready for CSS. For palettes, contrast checks and full conversions see color.com.info.

Open this color on color.com.info →

CSS color formats

FormatExampleNotes
HEX#16a34aTwo hex digits each for red, green, blue
Short HEX#0f0Each digit doubled: #00ff00
RGBrgb(22 163 74)0–255 per channel
HSLhsl(142 76% 36%)Hue angle, saturation, lightness
Alpha#16a34a80Last pair is opacity (80 ≈ 50%)

Hex is just base 16: a3 = 10 × 16 + 3 = 163. Try the number base converter.

Frequently asked questions

How do I convert HEX to RGB?
Split the hex into three pairs and convert each from base 16: #16a34a → 22, 163, 74.
Is HSL better than HEX?
They describe the same colors. HSL is easier to adjust by hand (make it lighter by raising L); HEX is compact.