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: #ARGB to #RGBA conversion #33707
Conversation
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.
whoops!
779f492
to
292c653
Compare
292c653
to
166b074
Compare
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.
Is there a test case where the previous version would parse out a faulty color string? I was wondering if this could also be covered with a test maybe here -
electron/spec-main/api-browser-window-spec.ts
Line 1079 in c9fd255
it('returns correct color with multiple passed formats', () => { |
@RaisinTen no - the issue is we don't get the alpha value back out so we can't properly compare it. That's something we could eventually consider changing, but probably out of scope of this PR. I've applied the other fix though! |
Release Notes Persisted
|
I have automatically backported this PR to "19-x-y", please check out #33755 |
* fix: argb to rgba conversion * chore: remove logging import * refactor: color_str -> converted_color_str
* fix: argb to rgba conversion * chore: remove logging import * refactor: color_str -> converted_color_str
Description of Change
Fixes an issue where
#ARGB
->#RGBA
and#AARRGGBB
->#RRGGBBAA
were converted improperly when setting background color.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where
#ARGB
->#RGBA
and#AARRGGBB
->#RRGGBBAA
were converted improperly when setting background color.