Developer Tools
HEX to HSL
Convert hexadecimal color codes to HSL (hue, saturation, lightness) values. Useful for CSS colors, design tokens, and color theory exploration.
hsl(12, 70%, 49%)
Hue: 12° | Saturation: 70% | Lightness: 49%
Color swatch
Developer Tools
Convert hexadecimal color codes to HSL (hue, saturation, lightness) values. Useful for CSS colors, design tokens, and color theory exploration.
hsl(12, 70%, 49%)
Hue: 12° | Saturation: 70% | Lightness: 49%
Color swatch
HEX to HSL conversion translates six-digit hexadecimal color codes (like #FF5733) into three-component HSL values where Hue is the color wheel position (0–360°), Saturation is color intensity (0–100%), and Lightness is brightness (0–100%). HSL is often more intuitive for design work because adjusting saturation or lightness doesn't require recalculating the entire color like it does in HEX format.
The converter first decodes the HEX code into red, green, and blue values (0–255 each). These RGB values are then normalized to 0–1 range and fed through the HSL algorithm: Hue is determined by which RGB component is largest; Saturation and Lightness are calculated from the max and min RGB values and their relationships. The result is three easy-to-manipulate values that CSS, SVG, and design tools natively understand.
Lightness = (Max + Min) / 2; Saturation = (Max − Min) / (1 − |2L − 1|); Hue = determined by which RGB max determines the segment on the color wheel (0–360°)Max and Min are the largest and smallest of the three normalized RGB values. Lightness tells you overall brightness; Saturation measures how vivid the color is; Hue anchors it to a position on the 360° color wheel. Higher saturation = more vivid; lower lightness = darker.
| Input | Result | Notes |
|---|---|---|
| #FF5733 | hsl(11, 100%, 60%) | A bright orange-red; high saturation and mid-range lightness make it pop in UI |
| #808080 | hsl(0, 0%, 50%) | Neutral gray; 0% saturation means no hue (achromatic) |
| #1E90FF | hsl(217, 100%, 48%) | Dodger blue; a primary color commonly used in web interfaces |
HSL separates color (Hue) from brightness (Lightness) and vividness (Saturation), making it easier to create color variations and maintain consistency in design systems. HEX is just RGB in hex notation—harder to tweak intuitively.
Yes—use our HSL to HEX converter (the reverse process). Most design tools also handle both natively.
Yes, all modern browsers (and IE 9+) support hsl() and hsla() in CSS. CSS Color Module Level 4 also supports the newer hsl(H S L) syntax without commas.
Expand it to 6 digits by doubling each character: #F57 becomes #FF5577. Most converters handle this automatically.
hsla() includes an alpha channel (opacity) as a fourth value, e.g., hsla(11, 100%, 60%, 0.8). hsl() is opaque (alpha = 1).
Most design tools accept hsl() values in color input fields or let you toggle to HSL sliders. Paste the HSL result into the color picker's text field or manually set H, S, L sliders.