GitToTheHub commented on code in PR #1661:
URL: https://github.com/apache/cordova-ios/pull/1661#discussion_r3346770506
##########
CordovaLib/Classes/Private/Plugins/CDVStatusBarInternal/CDVStatusBarInternal.m:
##########
@@ -37,8 +37,9 @@ - (void)setBackgroundColor:(CDVInvokedUrlCommand *)command
NSInteger valueR = [[command argumentAtIndex:0 withDefault:@0]
integerValue];
NSInteger valueG = [[command argumentAtIndex:1 withDefault:@0]
integerValue];
NSInteger valueB = [[command argumentAtIndex:2 withDefault:@0]
integerValue];
+ NSInteger valueA = [[command argumentAtIndex:3 withDefault:@255]
integerValue];
Review Comment:
But you are right, `window.getComputedStyle` creates a `rgba` value, where
the alpha would be the last value. The JS side on Android reads the first value
of `rgba` as alpha not as red:
<img width="700"
src="https://github.com/user-attachments/assets/ba9ff1ad-f200-4972-b541-df0413307bb3"
/>
So a hex like `#aaff0000` is interpreted as:
- A=170
- R=255
- G=0
- B=0
So I thing `window.getComputedStyle` was a little bit misused here to keep
the format `#AARRGGBB`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]