Hex to HSL converter

Type or paste a hex code to get hue, saturation and lightness.

How hex to HSL works

First the hex code becomes RGB, and each channel is divided by 255. Lightness is the average of the largest and smallest channel. Saturation is the spread between them, divided by 1 − |2L − 1|. Hue depends on which channel is largest and is measured in degrees around the color wheel.

Common colors in HSL

ColorHEXHSLHSV / HSB
Red#FF0000hsl(0, 100%, 50%)hsv(0, 100%, 100%)
Green#008000hsl(120, 100%, 25%)hsv(120, 100%, 50%)
Blue#0000FFhsl(240, 100%, 50%)hsv(240, 100%, 100%)
Black#000000hsl(0, 0%, 0%)hsv(0, 0%, 0%)
White#FFFFFFhsl(0, 0%, 100%)hsv(0, 0%, 100%)
Gray#808080hsl(0, 0%, 50%)hsv(0, 0%, 50%)
Navy Blue#000080hsl(240, 100%, 25%)hsv(240, 100%, 50%)
Teal#008080hsl(180, 100%, 25%)hsv(180, 100%, 50%)
Sage Green#9CAF88hsl(89, 20%, 61%)hsv(89, 22%, 69%)
Burgundy#800020hsl(345, 100%, 25%)hsv(345, 100%, 50%)
Lavender#E6E6FAhsl(240, 67%, 94%)hsv(240, 8%, 98%)
Gold#FFD700hsl(51, 100%, 50%)hsv(51, 100%, 100%)
Coral#FF7F50hsl(16, 100%, 66%)hsv(16, 69%, 100%)
Hot Pink#FF69B4hsl(330, 100%, 71%)hsv(330, 59%, 100%)
Beige#F5F5DChsl(60, 56%, 91%)hsv(60, 10%, 96%)
Charcoal#36454Fhsl(204, 19%, 26%)hsv(204, 32%, 31%)

Questions

What is HSL?
HSL describes a color by hue (its position on the color wheel, 0 to 360°), saturation (how vivid, 0 to 100%) and lightness (from black at 0% to white at 100%). It is easier to tweak by hand than hex or RGB.
Is HSL the same as HSB or HSV?
No. They share the hue, but HSB/HSV uses brightness (value) instead of lightness, so the saturation numbers differ too. Pure red is hsl(0, 100%, 50%) but hsv(0, 100%, 100%).
Can I use HSL in CSS?
Yes: color: hsl(91, 22%, 61%); works in every modern browser, and hsl() accepts an alpha value too.

More color tools