If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Course: Unlisted resources area > Unit 2

Lesson 1: ProcessingJS documentation

lerpColor(c1, c2, amount)

Calculates a color between two colors at a specific increment. The amount parameter is the amount to interpolate between the two values where 0.0 equal to the first color, 0.1 is very near the first color, 0.5 is half-way in between, etc.
Parameters:
NameDescription
c1Interpolate from this color
c2Interpolate to this color
amountA number between 0.0 and 1.0

Want to join the conversation?

No posts yet.