Garry's Mod Wiki

Color:Lerp

  Color Color:Lerp( Color target, number fraction )

Recently Added

This was recently added in version (2024.06.28). It might only be available on the Dev Branch right now.

Description

Performs linear interpolation between this and given colors.

Arguments

1 Color target
The target color to interpolate towards.
2 number fraction
The interpolation fraction. 0 means fully original color, 0.5 means in the middle between the 2 colors, 1 means fully target color, etc.

Returns

1 Color
The result of linear interpolation.