added paletteLerp#6960
Merged
Merged
Conversation
Contributor
Author
|
Here's what the new version requested using color stops uses: function setup() {
createCanvas(400, 400);
}
function draw() {
background(lerpPalette([
["white", 0],
["red", 0.05],
["green", 0.25],
["blue", 1]
], millis() / 10000 % 1));
} |
davepagurek
reviewed
Aug 11, 2024
Contributor
davepagurek
left a comment
There was a problem hiding this comment.
This looks good! You mentioned on Discord potentially having a version that supports just an array of numbers for evenly-spaced stops, do you want me to wait before merging for that or do you want that to be a follow-up?
davepagurek
approved these changes
Aug 11, 2024
Contributor
davepagurek
left a comment
There was a problem hiding this comment.
We talked on Discord and probably will end up doing another PR if we want to add a version with no stops, so I'll merge this now!
31 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #6959
Changes:
Add a function called
paletteLerp()for lerping/interpolating between a list/palette of colors.Screenshots of the change:
PR Checklist
npm run lintpasses