# Convert HEX to HSL

> Convert HEX color codes to HSL online. Free HEX to HSL converter with a worked example — get hue, saturation, and lightness from any hex.

HSL describes color the way humans think about it — hue, saturation, and lightness — which makes it ideal for building tints, shades, and accessible palettes. This converter turns a hex code into its HSL components.

## Example: HEX → HSL

Input:
```
#c0392b
#1dd1a1
#54a0ff
```

Output:
```
hsl(6, 63%, 46%)
hsl(164, 76%, 47%)
hsl(213, 100%, 66%)
```

## How to convert HEX to HSL

1. Convert the hex code to RGB channel values.
2. Normalize each channel to the 0–1 range.
3. Derive hue, saturation, and lightness to get hsl(6, 63%, 46%) from #c0392b.

## FAQ

### Why use HSL over hex?

HSL makes it easy to create related colors: keep the hue, change lightness for tints and shades, or change saturation for muted variants — all without guessing hex digits.

### Is the conversion exact?

Hue, saturation, and lightness are rounded to whole numbers for readability, which can introduce a tiny rounding difference when converting back.

## Related converters

- [HSL → HEX](https://www.devkult.com/convert/hsl-to-hex.md)
- [HEX → RGB](https://www.devkult.com/convert/hex-to-rgb.md)
- [RGB → HSL](https://www.devkult.com/convert/rgb-to-hsl.md)

Open the interactive converter: https://www.devkult.com/convert/hex-to-hsl