Colour codes converter
HEX, RGB and HSL, with a live swatch.
Quick answer
To convert a colour code, type a HEX, RGB or HSL value in any box. The other two update and you see the colour.
How to use the colour codes tool
- Type a colour in the HEX, RGB or HSL box, or use the colour picker.
- The other two boxes and the swatch update.
- Press Copy next to the code you need.
HEX (#FFD23F) is the short form web designers use. RGB gives the red, green and blue amounts from 0 to 255. HSL gives hue, saturation and lightness, which is easier to adjust by hand.
Common questions
How do I convert HEX to RGB?
Type the HEX code, with or without the #. The RGB box shows the three numbers. #FFD23F is rgb(255, 210, 63).
What does HSL mean?
Hue is the colour on a wheel from 0 to 360, saturation is how vivid it is, and lightness is how light or dark. It is handy for making a lighter or darker version of a colour.
Does it accept 3-digit HEX?
Yes. #F80 is the same as #FF8800.
Why do my values change by 1 when I convert back?
HSL values are rounded to whole numbers, so a round trip can shift a colour by a tiny amount. HEX and RGB are exact.
Is anything sent to a server?
No. It is all calculated in your browser.