RGB <-> HLS conversion based on http://support.microsoft.com/kb/29240
Hue is undefined if Saturation is 0 (grey-scale) This value determines where the Hue scrollbar is initially set for achromatic colors
Convert HLS to RGB.
Convert RGB to HLS.
import ae.utils.graphics.color; HLS!RGB hls; auto red = hls.fromHLS(0, 120, 240); assert(red == RGB(255, 0, 0)); ushort h,l,s; hls.toHLS(red, h, l, s); assert(h==0 && l==120 && s==240);
See Implementation
RGB <-> HLS conversion based on http://support.microsoft.com/kb/29240