Skip to main content

Color.Lerp(Color a, Color b, number t)

Linearly interpolates between colors a and b by t.

Parameters:

NameTypeDescription
aColorColor a.
bColorColor b.
tnumberFloat for combining a and b.

Returns:

typeDescription
Colorinterpolated color

Usage

---@type Color
local a;

---@type Color
local b;

---@type number
local t;


local val0 = Color:Lerp(a, b, t)

Extra Detail

t is clamped between 0 and 1. When t is 0 returns a. When t is 1 returns b.