This function transforms the color from RGB (Red, Green, Blue)
to HSL (Hue, Saturation, Lightness). The algorithm finds the minimum and maximum
RGB components to determine lightness, then calculates saturation and hue based on
the range and relative positions of the RGB components.
Converts an RGB color to the HSL color space.
This function transforms the color from RGB (Red, Green, Blue) to HSL (Hue, Saturation, Lightness). The algorithm finds the minimum and maximum RGB components to determine lightness, then calculates saturation and hue based on the range and relative positions of the RGB components.