-
Notifications
You must be signed in to change notification settings - Fork 12
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
Should we take short path in interpolateAngle? #33
Comments
Well, using Concerning |
using custom interpolation function it will work. if a.hue = 0 and b.hue = 720 and interpolateAngle is just a linear interpolation then |
True. But we would certainly loose the ability to interpolate between two colors in the shortest possible way (in HSL space). Right now: > midpoint = mix HSL (hsl 10.0 1.0 0.5) (hsl 350.0 1.0 0.5) 0.5
> (toHSLA midpoint).h
360.0 If we would use normal linear interpolation, we would get a hue of 180°. |
Yes but is short path always desired? If I want short path mix I would have done this: but by restricting to always use short path now i can't do |
Good points. This is pretty much the question whether we treat the HSL space as being periodic (in the hue-dimension) or as being infinite (also allowing multiple turns, as illustrated below). One possible option could be to add a |
btw if not sure, also in maybe we can add will think on it a bit more |
I came to this question lately when I saw gradient which was going over hue cycle 5 times here
as we can't have similar scale because of the "short path" thing
The text was updated successfully, but these errors were encountered: