Tools / HEX to HSL converter
HEX to HSL converter
Paste a HEX value and get the HSL result right away, plus every other format.
How HEX converts to HSL
First convert the hex code to RGB, then scale the channels to 0 to 1. Hue comes from which channel is largest, lightness is the average of the largest and smallest channel, and saturation measures how far apart they are. #1E90FF becomes about hsl(210, 100%, 56%).
Common colors in HEX and HSL
| Color | HEX | HSL |
|---|---|---|
| red | #FF0000 | hsl(0, 100%, 50%) |
| orange | #FFA500 | hsl(39, 100%, 50%) |
| gold | #FFD700 | hsl(51, 100%, 50%) |
| lime | #00FF00 | hsl(120, 100%, 50%) |
| teal | #008080 | hsl(180, 100%, 25%) |
| navy | #000080 | hsl(240, 100%, 25%) |
| indigo | #4B0082 | hsl(275, 100%, 25%) |
| purple | #800080 | hsl(300, 100%, 25%) |
| hotpink | #FF69B4 | hsl(330, 100%, 71%) |
| coral | #FF7F50 | hsl(16, 100%, 66%) |
| chocolate | #D2691E | hsl(25, 75%, 47%) |
| gray | #808080 | hsl(0, 0%, 50%) |
| silver | #C0C0C0 | hsl(0, 0%, 75%) |
| black | #000000 | hsl(0, 0%, 0%) |
How to use it
Three quick steps.
- Type or paste a HEX value (the # is optional).
- Read the HSL result instantly.
- Click any value to copy it.
Good to know
Get better results.
- You can also paste a hex code, rgb(), hsl() or a color name. The tool understands them all.
- Every other format is shown too, so one lookup covers all your needs.
- Values are rounded to whole numbers where it makes sense.
Common questions
How do I convert HEX to HSL?
First convert the hex code to RGB, then scale the channels to 0 to 1. Hue comes from which channel is largest, lightness is the average of the largest and smallest channel, and saturation measures how far apart they are. #1E90FF becomes about hsl(210, 100%, 56%).
Is this HEX to HSL converter free?
Yes. It is free, private and runs in your browser, so your colors are never uploaded.
Can I convert from other formats too?
Yes. Enter a hex code, rgb(), hsl() or a CSS color name and you still get every format.
More tools
Keep going with a related tool.