I use HSL (HSL = HSB as Heu saturation brightness) color filters. To convert a color to HSL i do :
Color myColor = Color.FromArgb(pixel[blue], pixel[green], pixel[red]);
int HSLhue = (int)myColor.GetHue(); // note normally its a float but i need an int
float HSLsat = myColor.GetSaturation() * 100;
float HSLlight = myColor.GetBrightness()*100; //mycolorGetBrightness allready is a float.
The problem i have with this code is that HSLheu works OK, and HSLlight works OK too, however when i use a color with some gray in it HSLsat doesnt reflect the proper value. From what i have read about it should be 0 for gray and 1 for pure color. So in my case this is from 0 to 100, but if i check on it to see if saturation falls within a certain range this doesnt work.