-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Fix til::color::layer_over #13946
Fix til::color::layer_over #13946
Conversation
Hello @zadjii-msft! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 7 hours 1 minute. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still my open Q but approving since it's EoD and it's small and you tested it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I believe that this change has a bug. See my comment above.)
I wrote a simple HTML page testing the alpha blending between blue and orange colors.
is in the range |
const auto resultB = (b * sourceAlpha + destination.b * destinationAlpha * aInverse) / resultA; | ||
const auto resultR = (r * a + destination.r * destination.a * aInverse) / resultA; | ||
const auto resultG = (g * a + destination.g * destination.a * aInverse) / resultA; | ||
const auto resultB = (b * a + destination.b * destination.a * aInverse) / resultA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to multiply by 255 if we simply make sure that the part in front of the division is in the range [0, 255^2]
. After dividing it by resultA
([0, 255]
) we get a result in the range [0, 255]
.
The color of inactive tab text is incorrect since #13689 due to the introduction
of
til::color::layer_over
which incorrectly calculated the RGB values.Validation Steps Performed
Co-authored-by: Leonard Hecker lhecker@microsoft.com