react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Create Color<->rgba utils on all platforms

Open zeyap opened this issue 1 year ago • 2 comments

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::Color where RGBA props are 8bit unsigned ints ([0,255])
  • apple: platform color format is UIColor where RGBA props are floats in [0,1]

[Internal]

Differential Revision: D59593659

zeyap avatar Jul 10 '24 18:07 zeyap

This pull request was exported from Phabricator. Differential Revision: D59593659

facebook-github-bot avatar Jul 10 '24 18:07 facebook-github-bot

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

analysis-bot avatar Jul 10 '24 19:07 analysis-bot

This pull request has been merged in facebook/react-native@97882a16b8232231425b7122abf92483cdb9f27b.

facebook-github-bot avatar Jul 15 '24 16:07 facebook-github-bot

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?

github-actions[bot] avatar Jul 15 '24 16:07 github-actions[bot]