Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list support for lerpColor like other color functions #6954

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RandomGamingDev
Copy link
Contributor

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 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);
}

PR Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lerpColor doesn't support list based colors despite other functions supporting it
1 participant