p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
Adds list support to the lerpColor like other color functions.
(I understand why this function doesn't support string based colors since you should know the actual value of the color when lerping between them, but adding list support is still definitely something that would be useful as seen in the referenced issue. However, if anyone thinks that adding string based color support to lerpColor as well would be preferred I'll add that to the PR.)
Screenshots of the change:
const red = [255, 0, 0];
const blue = [0, 255, 0];
function setup() {
// These always worked
fill(red);
fill(blue);
// This works now!
lerpColor(red, blue, 0.5);
}
Resolves #6953
Changes:
Adds list support to the
lerpColor
like other color functions. (I understand why this function doesn't support string based colors since you should know the actual value of the color when lerping between them, but adding list support is still definitely something that would be useful as seen in the referenced issue. However, if anyone thinks that adding string based color support tolerpColor
as well would be preferred I'll add that to the PR.)Screenshots of the change:
PR Checklist
npm run lint
passes