Convert colours between HEX, RGB and HSL with a live swatch.
Converted locally in your browser.
Understanding your result
Both 3-digit (#f00) and 6-digit (#ff0000) HEX are accepted, as is rgb(...) notation.
Formula and method
HEX maps directly to RGB byte values; HSL is derived from RGB using the standard hue, saturation and lightness conversion.
Worked example
#ff0000 is rgb(255, 0, 0) and hsl(0, 100%, 50%).
How to use this tool
- Enter a HEX or RGB colour.
- Read the HEX, RGB and HSL values.
Common mistakes to avoid
- Omitting the # or using an invalid HEX length.
About the Color Converter
Convert any colour between HEX, RGB and HSL formats and see a live preview swatch.
Explore all Developer Tools tools
Frequently asked questions
Does it support alpha?
This tool focuses on solid colours (HEX/RGB/HSL). Alpha transparency is not included.