From MiniScript Wiki
Jump to navigation Jump to search

color.lerp is a method that implements linear interpolation between two colors. It is commonly used for changing colors over time or painting gradients.


The method has this signature: color.lerp c1, c2, t

Parameter Description
c1 First color in hexcolor format
c2 Second color in hexcolor format
t Variable for how far to interpolate between the two colors (t <= 0 retunrs c1, t >= 0 returns c2, 0 < t < 1 returns color inbetween)


color.lerp,, 0
color.lerp,, 1
color.lerp,, 0.5
color.lerp,, 0.25

See also Color