What this tool does
HSL to HEX converts hue, saturation, and lightness into sRGB channels, rounds those channels to 8-bit integers, then writes them as a six-digit HEX value.
Enter the values in the calculator above and choose Calculate. The calculation runs in your browser; the inputs are not intentionally sent to a Colormapped application server.
How it works
- Normalize hue around the 0–360° color wheel.
- Convert saturation and lightness percentages to 0–1.
- Derive the red, green, and blue channels from the HSL cylinder.
- Round the RGB channels to integers and encode them as #RRGGBB.
Worked example
Input
hsl(240 83% 65%)Output
#5C5CF0This rounded HSL example produces RGB 92, 92, 240. It is close to #5B5CF0, but the earlier HEX→HSL display rounded away some precision.
When to use it
- Turn an HSL design token into a HEX value for systems that do not accept HSL.
- Check the concrete sRGB color produced by an HSL adjustment.
- Move hue/saturation/lightness experimentation into a six-digit brand or CSS value.
Accuracy and limits
- Input HSL is interpreted in the standard sRGB-oriented HSL model used by this tool.
- Round-tripping from a previously rounded HSL display may not reproduce the original HEX byte-for-byte.