Color Converter
Convert a HEX color code to its RGB and HSL values.
How it works
Enter a six-digit HEX color, with or without the leading #, and press Convert. You get the matching rgb() values and the HSL (hue, saturation, lightness) form, both of which can be pasted straight into CSS.
Only six-digit HEX is supported. Expand three-digit shorthand first, for example #1af becomes #11aaff.
Frequently asked questions
Does it accept three-digit HEX codes?
Not directly. Expand each digit by repeating it: #1af is the same as #11aaff.
What is HSL useful for?
HSL makes it easy to build lighter or darker shades by changing only the lightness value.
Is alpha transparency supported?
No. This tool handles opaque colors only.