Interpolation calculates a value between two other values. For example, the number 5 is halfway between 0 and 10. Different types of interpolation use different rates of change between values. Linear interpolation, abbreviated as lerp, uses a constant rate of change. The lerp() function linearly interpolates between two numbers. The lerpColor() function, demonstrated here, linearly interpolates between two colors. In this example, the stripeCount variable adjusts how many horizontal stripes appear. Setting the value to a higher number will look less like individual stripes and more like a gradient.
Related Examples

No alt text
Color Interpolation
Fade between two colors.

No alt text
Color Wheel
Create a visualization of the color spectrum.

No alt text
Bezier
Draw a set of curves.

No alt text
Kaleidoscope
Draw mirrored designs with the mouse.

No alt text
Noise
Generate naturalistic textures using Perlin noise.

No alt text
Recursive Tree
Draw a tree using a function that calls itself.