@@ -196,6 +196,22 @@ module ValueXY = {
|
196 | 196 | external getTranslateTransform: t => array<Style.transform> = "getTranslateTransform" |
197 | 197 | } |
198 | 198 | |
| 199 | +module Color = { |
| 200 | +include ValueMethods({ |
| 201 | +type t = {"r": Value.t, "g": Value.t, "b": Value.t, "a": Value.t} |
| 202 | +type rawValue = {"r": float, "g": float, "b": float, "a": float} |
| 203 | +type addListenerCallback = rawValue => unit |
| 204 | + }) |
| 205 | + |
| 206 | + @obj external rgbaValue: (~r: float, ~g: float, ~b: float, ~a: float) => rawValue = "" |
| 207 | + |
| 208 | + @new @scope("Animated") @module("react-native") |
| 209 | +external create: rawValue => t = "Color" |
| 210 | + |
| 211 | + @new @scope("Animated") @module("react-native") |
| 212 | +external createFromString: Color.t => t = "Color" |
| 213 | +} |
| 214 | + |
199 | 215 | @module("react-native") @scope("Animated") |
200 | 216 | external delay: float => Animation.t = "delay" |
201 | 217 | |
|