示例#1
0
 public static Color Lerp(Color value1, Color value2, float amount)
 {
     amount = Calc.Normalize(amount);
     return(new Color(
                (int)Calc.Lerp(value1.R, value2.R, amount),
                (int)Calc.Lerp(value1.G, value2.G, amount),
                (int)Calc.Lerp(value1.B, value2.B, amount),
                (int)Calc.Lerp(value1.A, value2.A, amount)));
 }
示例#2
0
        public Color WithOpacity(float opacity)
        {
            opacity = Calc.Normalize(opacity);

            return(new Color(this, opacity));
        }