Esempio n. 1
0
        public static Color GetPure(
            this Color c
            )
        {
            AHSB ahsb = c.Double().ToAHSB();

            ahsb.Brightness = 1.0;
            ahsb.Saturation = 1.0;

            return(ahsb.Double().ToColor());
        }
Esempio n. 2
0
        public static DoubleColor AlterHue(
            this DoubleColor c,
            ColorWheelBase wheel,
            double hue
            )
        {
            AHSB src  = c.ToAHSB();
            AHSB dest = wheel.GetColor(hue).ToAHSB();

            dest.Saturation = src.Saturation;
            dest.Brightness = src.Brightness;
            dest.Alpha      = src.Alpha;

            return(dest.Double());
        }
 public static DoubleColor FromAHSB(
     AHSB a
     )
 {
     return(a.Double());
 }