RGB to HSL Converter
Enter an rgb() value or use the R, G, B fields to convert RGB colors to HSL. The output shows both the hsl() CSS function and the individual H, S, L values.
HSL
H, S%, L%
HEX
RGB to HSL Conversion
RGB values are first normalized to a 0–1 range. The maximum and minimum channel values determine lightness. Saturation depends on the difference between max and min channels relative to lightness. Hue is calculated based on which channel is dominant: red places the hue near 0° or 360°, green near 120°, and blue near 240°.
The result is expressed as hsl(h, s%, l%) where H is in degrees and S and L are percentages.