mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
bb796be9e1
Summary: Currently, there is a bug with the way that fabric translates float values for color components to hex/int value (which android uses). There are two main problems with the current setup. The first is that we are using 256 as our ratio instead of 255 which is the maximum value for any color component in hex. The second is that we cast the components to ints instead of rounding which truncates the values. We uncovered this with UIQR because our off-by-one color values were incorrectly off a little bit extra for fabric surfaces. Changelog: [Internal] updates the float-to-int value conversion for color components to be fully accurate Reviewed By: shergin Differential Revision: D26161396 fbshipit-source-id: 884e27ffa01b116f9307c00298bb8d888f9f6dd7