Commit 8661085
Update ColorPropConverterto support color function values (facebook#43031)
Summary:
This adds support for color function values to ColorPropConverter per the wide gamut color [RFC](react-native-community/discussions-and-proposals#738). It updates the color conversion code so that it returns a Color instance before ultimately being converted to an Integer in preparation for returning long values as needed.
bypass-github-export-checks
## Changelog:
[ANDROID] [ADDED] - Update ColorPropConverter to support color function values
Pull Request resolved: facebook#43031
Test Plan:
Colors should work exactly the same as before.
Follow test steps from facebook#42831 to test support for color() function syntax.
While colors specified with color() function syntax will not yet render in DisplayP3 color space they will not be misrecognized as resource path colors but will instead fallback to their sRGB color space values.
Differential Revision: D557490581 parent d59de54 commit 8661085
File tree
2 files changed
+44
-7
lines changed- packages/react-native/ReactAndroid
- api
- src/main/java/com/facebook/react/bridge
2 files changed
+44
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| 650 | + | |
650 | 651 | | |
651 | 652 | | |
652 | 653 | | |
| |||
packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/ColorPropConverter.java
Lines changed: 43 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | | - | |
33 | | - | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
42 | 66 | | |
43 | 67 | | |
44 | 68 | | |
| |||
48 | 72 | | |
49 | 73 | | |
50 | 74 | | |
51 | | - | |
52 | | - | |
| 75 | + | |
| 76 | + | |
53 | 77 | | |
54 | 78 | | |
55 | 79 | | |
| |||
63 | 87 | | |
64 | 88 | | |
65 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
66 | 101 | | |
67 | 102 | | |
68 | 103 | | |
| |||
89 | 124 | | |
90 | 125 | | |
91 | 126 | | |
92 | | - | |
93 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
94 | 130 | | |
95 | 131 | | |
96 | 132 | | |
| |||
0 commit comments