Skip to content

raylib.ColorLerp

JoeStrout edited this page Nov 16, 2026 · 3 revisions

Get color linearly interpolated between two colors, amount [0.0..1.0]

Parameters

Parameter Default Value Note
color1
color2
amount

Return value

Condition Return Value
(always) map

Notes

Example

// Interpolate halfway between black and white
c = raylib.ColorLerp(raylib.BLACK, raylib.WHITE, 0.5)
print c  // a mid-gray color

Clone this wiki locally