Create Color<->rgba utils on all platforms
Summary:
Changelog
As a followup to https://github.com/facebook/react-native/pull/45139
There I only implemented hostPlatformColorFromRGBA and alpha/red/green/blueFromHostPlatformColor on cxx platform, then used cxx platform specific method at some places. but really I should implement and use methods in Color.h that are platform agnostic
- cxx/android: platform color format is int32_t, RGBA are 8bit unsigned int ([0,255])
- windows: platform color format is
winrt::Windows::UI::Colorwhere RGBA props are 8bit unsigned ints ([0,255]) - apple: platform color format is
UIColorwhere RGBA props are floats in [0,1]
[Internal]
Differential Revision: D59593659
This pull request was exported from Phabricator. Differential Revision: D59593659
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 21,234,713 | -15 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 24,431,907 | -15 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: 0fd4a9447e432b8c537825f571409f56ae63dc90 Branch: main
This pull request has been merged in facebook/react-native@97882a16b8232231425b7122abf92483cdb9f27b.
This pull request was successfully merged by @zeyap in 97882a16b8232231425b7122abf92483cdb9f27b
When will my fix make it into a release? | How to file a pick request?