YY Color Convertor Convert color between RGB,HSL,HSB,CMYK,YUV,YIQ,XYZ,xyY,Lab,Luv,LCH ... Mostly, the value in this code is in range 0 to 1. Example: double r, b, g, h, s, l; r = 1.0; g = 0.0; b = 0.2; RGB2HSL(r, g, b, &h, &s, &l);