Color in p5.js

This week we explored the use of color in p5.js. While I still have a long way to go with understanding hue in terms of pixels (and not paint!), I was excited to learn about the lerpColor() function in particular.

The lerpColor() function can interpolate between two colors and return a third color between them. The amount of color interpolation is controlled by parameters.

When applied to art, this computational element can produce some beautiful and abstract results.

Link to Sketch in p5.js

Inspiration & Process

František Kupka. Amorpha: Fugue in Two Colors. 1912

I was inspired by Kupka’s Amorpha series of paintings from the early 1900s. He often used a pared down palette consisting of a few colors (red, blue, black, and white in this case) to create a “fugue” (based on a musical composition with complex repeated patterns and themes). The idea of the fugue brought to mind the lerpColor() function; I think Kupka would have been a fan.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s