Color converter

HSL to HEX Converter

Convert HSL hue, saturation, and lightness values to HEX.

Hue wraps around the color wheel; saturation and lightness are percentages.

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

  1. Normalize hue around the 0–360° color wheel.
  2. Convert saturation and lightness percentages to 0–1.
  3. Derive the red, green, and blue channels from the HSL cylinder.
  4. Round the RGB channels to integers and encode them as #RRGGBB.

Worked example

Inputhsl(240 83% 65%)
Output#5C5CF0

This 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.

Useful next steps