Animatroller.Framework.HSV.HSV C# (CSharp) Method

HSV() public method

public HSV ( Color color ) : System
color Color
return System
        public HSV(Color color)
        {
            int max = Math.Max(color.R, Math.Max(color.G, color.B));
            int min = Math.Min(color.R, Math.Min(color.G, color.B));

            this.Hue = color.GetHue();
            this.Saturation = (max == 0) ? 0 : 1d - (1d * min / max);
            this.Value = max / 255d;
        }

Same methods

HSV::HSV ( double hue, double saturation, double value ) : System