¡@

Home 

javascript Programming Glossary: hsv.saturation

JS function to calculate complementary colour?

http://stackoverflow.com/questions/1664140/js-function-to-calculate-complementary-colour

max max3 rgb.r rgb.g rgb.b dif max min3 rgb.r rgb.g rgb.b hsv.saturation max 0.0 0 100 dif max if hsv.saturation 0 hsv.hue 0 else if.. rgb.r rgb.g rgb.b hsv.saturation max 0.0 0 100 dif max if hsv.saturation 0 hsv.hue 0 else if rgb.r max hsv.hue 60.0 rgb.g rgb.b dif else.. Math.round max 100 255 hsv.hue Math.round hsv.hue hsv.saturation Math.round hsv.saturation return hsv RGB2HSV and HSV2RGB are..