Color Converter: HEX to RGB and HSL

Type a HEX code, an RGB value or an HSL value – the other two formats and the color preview update as you type.

HEX, RGB and HSL

HEX writes the red, green and blue channels as three two-digit hexadecimal numbers (#FF5733). RGB gives the same channels as numbers from 0 to 255 (255, 87, 51). HSL describes the color as hue (0–360°), saturation and lightness (%), which is easier for making lighter or darker shades.

How to convert HEX to RGB

Split the six digits into pairs and convert each pair from base 16 to base 10: FF = 255, 57 = 87, 33 = 51. Three-digit shorthand codes double each digit, so #F53 is #FF5533.

Frequently asked questions

What is #FF5733 in RGB?

#FF5733 is rgb(255, 87, 51), or hsl(11, 100%, 60%).

What is white and black in HEX?

White is #FFFFFF (255, 255, 255) and black is #000000 (0, 0, 0).

Is HEX the same as RGB?

Yes, both describe the same red, green and blue values; HEX writes them in base 16 and RGB in base 10.