Color Code Tools

HEX, RGB and HSL color converter

Type a value in any format and the others update.

The three formats

HEX is a six digit base 16 code for red, green and blue. RGB gives the same channels as 0 to 255 numbers. HSL describes hue (0 to 360 degrees), saturation and lightness, which makes it easier to make a color lighter or less vivid by hand.

Questions

How do I convert HEX to RGB?

Split the six digits into three pairs and convert each pair from base 16. For example #2457d6 is 36, 87, 214.

Does it accept 3 digit HEX?

Yes. #abc expands to #aabbcc.