Convert HEX color codes to HSL (Hue, Saturation, Lightness) and HSLA format with real-time preview, native color picker, channel sliders, and instant copy.
HSL stands for Hue, Saturation, and Lightness. Unlike the RGB or HEX color models—which represent colors by mixing physical red, green, and blue light components—the HSL color model aligns closely with how humans perceive and describe color:
While HEX codes (such as #006D77) are compact, making color adjustments in pure HEX is difficult without a color picker. With HSL:
hsl(185, 100%, 23%) → hsl(185, 100%, 30%)).The conversion from hexadecimal to HSL takes place in three distinct steps:
#FF5733 or #006D77) into their cylindrical-coordinate HSL (Hue, Saturation, Lightness) equivalents. This makes it easier for frontend developers and designers to adjust lightness, saturation, and hue variations in CSS.
#F0A) is shorthand for a 6-digit HEX code where each character is doubled. For example, #F0A expands to #FF00AA. Our converter automatically expands 3-digit shorthand into standard 6-digit notation before performing the mathematical HSL conversion.
#RRGGBBAA). The first six characters are converted into Hue, Saturation, and Lightness, while the final two characters represent the alpha opacity channel (0–255), which is normalized to a 0.00–1.00 float for the CSS hsla() output.
#000000), White (#FFFFFF), and all shades of gray are achromatic colors, meaning the red, green, and blue values are equal ($R = G = B$). Because the difference between the maximum and minimum RGB channels is zero ($Delta = 0$), there is no chromatic pigment or color intensity present, resulting mathematically in $H = 0^circ$ and $S = 0%$.
hsl() function. For example:
/* Standard legacy CSS */
color: hsl(185, 100%, 23%);
color: hsla(185, 100%, 23%, 0.8);
/* Modern CSS Color Module Level 4 syntax */
color: hsl(185deg 100% 23% / 80%);
Both syntaxes are valid in modern web browsers.