hex→rgb

HEX to RGB to HSL Converter

Enter a colour once, get HEX, RGB, and HSL side by side.

Using toolbook means you agree to our Terms and Privacy Policy.

HEX
#f97316
RGB
rgb(249, 115, 22)
HSL
hsl(25, 95%, 53%)
Data sent from your device
0 bytes sent

Your files stay on your device

How to use it

Type or pick a colour in HEX, RGB, or HSL and instantly get the other two, each ready to copy.

Type a colour in any format — like #f97316, rgb(249, 115, 22), or hsl(24, 95%, 53%) — or pick one with the colour swatch. All three formats appear at once, each with a copy button.

They’re just different ways of writing the same colour. HEX and RGB say how much red, green, and blue to mix. HSL describes it the way people think: which colour, how vivid, and how light or dark — which is why design apps often use it for sliders.

Short hex codes like #f60 work too.

FAQ

Which formats can I paste in?

HEX (#f97316 or #f60), rgb() or rgba(), and hsl() or hsla().

Does it keep transparency?

No. Transparency is accepted but left out of the results — this converts solid colours.

How it worksFor the curious

HEX and RGB both encode red, green, and blue channel intensities — HEX in base 16, RGB as three numbers from 0–255 — so converting between them is a radix change.

RGB to HSL finds each channel’s min and max to derive lightness and saturation, then works out which channel dominates to compute hue. The formulas are short and implemented directly in this page.

Alpha in rgba() and hsla() input is accepted but not carried through; this tool converts solid colours.

Related tools