Q:

How to determine the color hue?

let's say that I have a HEX color #a08040. How can I determine in C#, if that color is the one of the many hues of the Brown color ?
In the other words, I have 4 colors: Brown, Red, Black, Gray. 
How to determine what color hue is my HEX color?

A:

If you are using WinForms, the Color.GetHue method will do exactly what you want. 
Edit
Unfortunately, there is no WPF equivalent to GetHue, you'll have to convert to a WinForms Color if you want to use GetHue from WPF. You could also compute the Hue yourself, if you're feeling frisky... Wikipedia has the formula you'd need to use. 

