-
-
Notifications
You must be signed in to change notification settings - Fork 105
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 multiple stops for gradient command #49
Comments
Hello, @sharkdp. Do you accept contributions? I can help with this issue. 😊 |
Yes, I do. I have implemented something like this in the past in a similar project (but in PureScript, not in Rust): We could use this as a starting point for the design of the new functionality. In particular, the way how a "color scale" is represented as a list of |
So the idea is to create a color scale using pairs of colors and positions. This will allow to position a color in the middle or close to others. Evenly distributed:
Unevenly distributed:
After this, I can use the mixing function and compute the fraction to sample any given position in the color scale. With this new function, I can sample a gradient with multiple colors similar to the current gradient command implementation. Is this right? |
Yes, exactly 👍 |
The text was updated successfully, but these errors were encountered: