Hi Teknomage1,
I actually had thought about using Hue rather than to consider the RGB values. Indeed by using hue it makes my life easier. One question though, will it be correct if I am using hue so as to count distinct colour in an image? I have tried this and had a number but not sure whether the amount is correct. Or do I need to consider both saturation and value as well?
Thank you

and hoping to hear from you.
~inox