UnityEngine.Color32.Lerp C# (CSharp) Method

Lerp() public static method

Linearly interpolates between colors a and b by t.

public static Lerp ( Color32 a, Color32 b, float t ) : Color32
a Color32
b Color32
t float
return Color32
        public static Color32 Lerp(Color32 a, Color32 b, float t)
        {
            t = Mathf.Clamp01(t);
            return new Color32((byte) (a.r + ((b.r - a.r) * t)), (byte) (a.g + ((b.g - a.g) * t)), (byte) (a.b + ((b.b - a.b) * t)), (byte) (a.a + ((b.a - a.a) * t)));
        }