HEX, RGB and HSL color converter
Type a color in HEX, RGB or HSL and see the automatic conversion to the other formats, with a preview.
What it is for
The color converter takes a color in HEX, RGB or HSL and instantly shows the conversion to the other formats, with a preview of the tone. You type the value you have and get the equivalent you need.
It is useful when a color code is in one format and your project requires another, without opening a heavy editor just for that.
The color formats
- HEX: the six-digit code like #1A2B3C, standard on the web and in CSS.
- RGB: defines the color by amounts of red, green and blue, ideal for screens.
- HSL: uses hue, saturation and lightness, great for adjusting a tone intuitively.
When to use
- Convert a HEX from a brand guide into the RGB used by another program.
- Get the HSL of a color to lighten or darken it by adjusting the lightness.
- Check whether two codes in different formats represent the same color.
Limitations
Conversion is mathematical between the RGB and HSL spaces and the HEX format, without color profiles or CMYK for printing. Rounding may cause tiny one-point differences in some values. Everything runs in the browser, with nothing sent to servers.
Frequently asked questions
- What is the difference between HEX, RGB and HSL?
- HEX is the standard web and CSS code, RGB defines the color by red, green and blue for screens, and HSL uses hue, saturation and lightness, which is easier to adjust by hand.
- Is the conversion exact?
- Yes, within the screen color space. There may be a tiny rounding difference in some values, but the color shown in the preview matches the result.
- Are the values sent to any server?
- No. The conversion happens entirely in your browser.