I should also point out that HSV/HLS/HSB/etc is not a useful color space to deal with.&nbsp; Excellent details as to why are provided by Charles Poynton:<br><br><a href="http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC36">
http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC36</a><br><a href="http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html#HSI">http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html#HSI</a><br>
<br>If you need brightness or saturation then use YUV which properly accounts for non-linear aspects of color.&nbsp; The &#39;hue&#39; part of HSV is worthless.<br>