Files
react-native/ReactCommon/react/renderer/graphics
Sara Valderrama bb796be9e1 fix rounding for translation to android/ios colors
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
2021-02-04 14:18:41 -08:00
..
2021-01-09 22:11:00 -08:00
2021-01-09 22:11:00 -08:00
2021-01-09 22:11:00 -08:00