Nez.Portable/Utils/Extensions/ColorExt.cs
/// <summary>
/// linearly interpolates Color from - to
/// </summary>
/// <param name="from">From.</param>
/// <param name="to">To.</param>
/// <param name="t">T.</param>
linearly interpolates Color from - to
linearly interpolates Color from - to
public static Color lerp(Color from, Color to, float t)
        {
            var t255 = (int)(t * 255);
            return new Color(
                from.R + (to.R - from.R) * t255 / 255,
                from.G + (to.G - from.G) * t255 / 255,
                from.B + (to.B - from.B) * t255 / 255,
                from.A + (to.A - from.A) * t255 / 255);
        }
public static Color lerp ( Color from , Color to , float t ) { var t255 = ( int ) ( t * 255 ) ; return new Color ( from . R + ( to . R - from . R ) * t255 / 255 , from . G + ( to . G - from . G ) * t255 / 255 , from . B + ( to . B - from . B ) * t255 / 255 , from . A + ( to . A - from . A ) * t255 / 255 ) ; }
linearly interpolates Color from - to
linearly interpolates Color from - to
from
Color
None
to
Color
None
t
float
None