What is a HEX to HSL converter?
A HEX to HSL converter rewrites an sRGB color as hue, saturation, and lightness. Hue describes a position around the color wheel, saturation describes color intensity, and lightness moves from black through the color to white.
How to convert HEX to HSL
- Enter a 3- or 6-digit HEX color, with or without
#, or select the color preview. - Check the hue, saturation, and lightness values.
- Copy a CSS
hsl()function or the raw channels.
HEX to HSL example
#FF5733 first becomes RGB 255, 87, 51. The highest channel is 255, the lowest is 51, and their difference determines saturation and hue. The result is approximately:
hsl(10.6 100% 60%)HSL values are displayed with up to one decimal place. The conversion keeps full precision until the displayed result is formatted.
How HEX becomes HSL
HEX pairs are converted to normalized RGB channels. Lightness is the midpoint of the largest and smallest RGB values. Saturation depends on their difference and the lightness, while hue depends on which RGB channel is largest.
Gray colors have 0% saturation. Their hue has no visible effect, so this converter reports 0°.
HEX vs. HSL
HEX is compact for saving and delivering a color. HSL separates color family, intensity, and lightness, which can make manual adjustments easier. HSL is not a perceptually uniform color space, so equal numeric changes do not always look equally large.
Use the HSL to HEX Converter for the reverse direction, or HEX to RGB Converter when you need decimal channels.
HEX to HSL FAQ
Can I enter three-digit HEX?
Yes. Each digit is repeated before conversion, so #F09 becomes #FF0099.
What range does hue use?
Hue is expressed in degrees around a 0–360 color wheel. Equivalent turns represent the same hue.
Why can the result contain decimals?
Many HEX colors do not map to whole HSL percentages or degrees. One decimal place gives a useful representation without long floating-point values.
Does converting to HSL change the color?
The formulas describe the same sRGB color. Copying rounded HSL values back to RGB can occasionally change a channel by one unit.
Why are 4- and 8-digit HEX values rejected?
They include alpha transparency. Plain HSL cannot preserve that channel, so it is not discarded silently.