LitDev.LDColours.GetHue C# (CSharp) Method

GetHue() public static method

Get the Hue component of a colour.
public static GetHue ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive
        public static Primitive GetHue(Primitive colour)
        {
            try
            {
                return RGB2HSL(GetRed(colour), GetGreen(colour), GetBlue(colour))[0];
            }
            catch (Exception ex)
            {
                Utilities.OnError(Utilities.GetCurrentMethod(), ex);
                return 0;
            }
        }