Skip to content

Commit 3360c24

Browse files
authored
Add Color module. (#448)
1 parent 5d0e62b commit 3360c24

50 files changed

Lines changed: 588 additions & 126 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎reason-react-native/src/apis/ActionSheetIOS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ external options:
1414
~destructiveButtonIndex: int=?,
1515
~title: string=?,
1616
~message: string=?,
17-
~tintColor: Style.color=?,
17+
~tintColor: Color.t=?,
1818
unit
1919
) =>
2020
options =

‎reason-react-native/src/apis/ActionSheetIOS.re‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ external options:
77
~destructiveButtonIndex: int=?,
88
~title: string=?,
99
~message: string=?,
10-
~tintColor: Style.color=?,
10+
~tintColor: Color.t=?,
1111
unit
1212
) =>
1313
options =
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict';
2+
3+
4+
function rgb(r, g, b) {
5+
return "rgb(" + (String(r) + (", " + (String(g) + (", " + (String(b) + ")")))));
6+
}
7+
8+
function rgba(r, g, b, a) {
9+
return "rgba(" + (String(r) + (", " + (String(g) + (", " + (String(b) + (", " + (String(a) + ")")))))));
10+
}
11+
12+
function hsl(h, s, l) {
13+
return "hsl(" + (String(h) + (", " + (String(s) + ("%, " + (String(l) + "%)")))));
14+
}
15+
16+
function hsla(h, s, l, a) {
17+
return "hsl(" + (String(h) + (", " + (String(s) + ("%, " + (String(l) + ("%, " + (String(a) + ")")))))));
18+
}
19+
20+
exports.rgb = rgb;
21+
exports.rgba = rgba;
22+
exports.hsl = hsl;
23+
exports.hsla = hsla;
24+
/* No side effect */

0 commit comments

Comments
 (0)