public static ColorBgra Lerp(ColorBgra from, ColorBgra to, double frac) { ColorBgra ret = new ColorBgra(); ret.B = (byte)ClampToByte(Lerp(from.B, to.B, frac)); ret.G = (byte)ClampToByte(Lerp(from.G, to.G, frac)); ret.R = (byte)ClampToByte(Lerp(from.R, to.R, frac)); ret.A = (byte)ClampToByte(Lerp(from.A, to.A, frac)); return ret; } public static byte ClampToByte(double x)