-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Color maths 4 #12575
Color maths 4 #12575
Conversation
Looking great! I'll just repeat what I said on discord here as well: Eventually I want to have better support for non-linear alpha blending modes (perhaps with some sort of Mostly what I see remaining is bike-shedding about the specific implementation of the color algebra. The operations don't need to be perfect but they do need to be well defined. |
Rereading #12163 (comment) it looks like we might want to exclude alpha from scalar multiplication/division. |
That would break splines, as it breaks distributivity over addition. |
After looking at some other color crates, I am less concerned about the alpha component. We've got enough approvals for merge, and this isn't marked controversial so I am adding the tag. |
Objective
Solution
Laba
,Oklaba
,LinearRgba
andXyza
as all of them are either physically or perceptually linear as mentioned by @alice-i-cecile in the issue.Changelog
LinearRgba
may modify alpha now.Migration Guide
LinearRgba
need to be aware of the change and maybe use the.clamp()
methods or manually set thealpha
channel.