G
GamutDesk

HSL to HEX Code Converter

Convert Hue degrees, Saturation, and Lightness coordinates into standard 6-digit hexadecimal web color codes.

100% Client-SideZero Data Collection
HSL Cylindrical Sliders
Hue (0° - 360°)
Saturation (0% - 100%)
Lightness (0% - 100%)
Generated Hex
#2463EB
Hexadecimal Value
#2463EB
Equivalent RGB:rgb(36, 99, 235)

Technical Specification & Mathematical Principles

Chroma is calculated as C = (1 - |2L - 1|) * S, followed by intermediate offset X = C * (1 - |(H / 60) mod 2 - 1|).

The resulting floating-point primary channels (R', G', B') are shifted by m = L - C / 2, multiplied by 255, and converted to base-16 hex bytes.

Frequently Asked Questions

The conversion computes chroma C = (1 - |2L - 1|) * S, secondary component X = C * (1 - |(H / 60) mod 2 - 1|), and lightness match m = L - C / 2, which then map directly to sRGB channels.

Related Design & Color Instruments