HSL to HEX Code Converter
Convert Hue degrees, Saturation, and Lightness coordinates into standard 6-digit hexadecimal web color codes.
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
How are intermediate chroma and lightness variables calculated?
Why does 0% saturation always produce shades of gray?
What happens if Lightness is set to 0% or 100%?
Related Design & Color Instruments
HEX to RGB Converter
Convert hexadecimal web color strings (#RRGGBB) to decimal integer rgb(r, g, b) tuples instantly.
RGB to HEX Converter
Convert decimal RGB integer components (0-255) to uppercase 6-digit padded hexadecimal strings.
HEX to HSL Converter
Convert hexadecimal color codes to CSS HSL and HSLA cylindrical coordinates with step-by-step algebraic formula breakdowns.
Pantone to HEX Matcher
Instant Pantone (PMS) to HEX, RGB, and CMYK color converter. Find the closest hexadecimal code and reverse-match HEX to PMS using CIE Delta E math.