mirror of
https://github.com/zhigang1992/react-native-reanimated.git
synced 2026-01-12 22:50:47 +08:00
Clarify that color node accepts only integer values (#190)
I see it was written here before but it calls for clarifying a bit
This commit is contained in:
committed by
Krzysztof Magiera
parent
41fcf4b51b
commit
3840256d9d
@@ -559,7 +559,7 @@ Maps an input value within a range to an output value within a range. Also suppo
|
||||
color(red, green, blue, alpha)
|
||||
```
|
||||
|
||||
Creates a color node in RGBA format, where the first three input nodes should have integer values in the range 0-255 and correspond to color components Red, Green and Blue respectively. Last input node should have a value between 0 and 1 and represents alpha channel (value `1` means fully opaque and `0` completely transparent). Alpha parameter can be ommited, then `1` (fully opaque) is used as a default.
|
||||
Creates a color node in RGBA format, where the first three input nodes should have *integer* values in the range 0-255 (consider using `round` node if needed) and correspond to color components Red, Green and Blue respectively. Last input node should have a value between 0 and 1 and represents alpha channel (value `1` means fully opaque and `0` completely transparent). Alpha parameter can be ommited, then `1` (fully opaque) is used as a default.
|
||||
|
||||
The returned node can be mapped to view properties that represents color (e.g. [`backgroundColor`](https://facebook.github.io/react-native/docs/view-style-props.html#backgroundcolor)).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user