Color converter

Switch a HEX code to RGB or HSL, in any direction. All three fields update together.

Color converter is a free tool that runs entirely in your browser, with no data ever sent to a server. Turn a color from HEX to RGB or HSL, in any direction.

Three ways to write the same color

HEX encodes red, green and blue in base 16 : it's the most common format in CSS and design software. RGB expresses the same three values in base 10, from 0 to 255. HSL describes color differently : its hue on a 0 to 360° wheel, its saturation and its lightness as a percentage ; it's the most convenient format for lightening or darkening a color without shifting its hue.

What this tool does not do

This tool only performs the calculation described above, without checking how you intend to use the result. There is no limit set by the tool itself : the only constraint is your device's memory.

Frequently asked questions

Why use HSL instead of HEX?

To derive variants of the same color : lowering only the lightness in HSL darkens the color while keeping the exact same hue, which HEX doesn't let you do by eye.

Is the result accurate to the screen displaying it?

The math is exact for the web's standard color space (sRGB). The final rendering then depends on each screen's calibration, as with any digital color.

Is my data sent to a server?

No : the text you type or paste is processed entirely in your browser, on your device. It is never transmitted to a server.