HEX, RGB, HSL converter

Color converter online: convert a color between HEX, RGB and HSL — for example HEX to RGB or RGB to HEX. Pick a color or enter a code to get all three formats.

#1E40AF

rgb(30, 64, 175)

hsl(226, 71%, 40%)

How to use it

1

Pick a color

Click the swatch and pick a color — or type a HEX code by hand.

2

See the formats

HEX, RGB and HSL are recalculated automatically.

3

Copy the one you need

Click “Copy” next to any format.

Why it's useful

The same color is specified differently across tools: designers work in HEX, RGB is handier in CSS and graphics, and HSL is best for picking shades and lightening/darkening. Converting by hand is awkward and error-prone.

This converter instantly translates a color between HEX, RGB and HSL both ways and shows a swatch preview. Just pick a color or enter a code — the other formats appear automatically.

FAQ

HEX and RGB define a color via red, green and blue channels (HEX in hexadecimal). HSL describes it via hue, saturation and lightness — handier for picking shades.