module Color:sig
..end
type
name =
| |
Aliceblue |
| |
Antiquewhite |
| |
Aqua |
| |
Aquamarine |
| |
Azure |
| |
Beige |
| |
Bisque |
| |
Black |
| |
Blanchedalmond |
| |
Blue |
| |
Blueviolet |
| |
Brown |
| |
Burlywood |
| |
Cadetblue |
| |
Chartreuse |
| |
Chocolate |
| |
Coral |
| |
Cornflowerblue |
| |
Cornsilk |
| |
Crimson |
| |
Cyan |
| |
Darkblue |
| |
Darkcyan |
| |
Darkgoldenrod |
| |
Darkgray |
| |
Darkgreen |
| |
Darkgrey |
| |
Darkkhaki |
| |
Darkmagenta |
| |
Darkolivegreen |
| |
Darkorange |
| |
Darkorchid |
| |
Darkred |
| |
Darksalmon |
| |
Darkseagreen |
| |
Darkslateblue |
| |
Darkslategray |
| |
Darkslategrey |
| |
Darkturquoise |
| |
Darkviolet |
| |
Deeppink |
| |
Deepskyblue |
| |
Dimgray |
| |
Dimgrey |
| |
Dodgerblue |
| |
Firebrick |
| |
Floralwhite |
| |
Forestgreen |
| |
Fuchsia |
| |
Gainsboro |
| |
Ghostwhite |
| |
Gold |
| |
Goldenrod |
| |
Gray |
| |
Grey |
| |
Green |
| |
Greenyellow |
| |
Honeydew |
| |
Hotpink |
| |
Indianred |
| |
Indigo |
| |
Ivory |
| |
Khaki |
| |
Lavender |
| |
Lavenderblush |
| |
Lawngreen |
| |
Lemonchiffon |
| |
Lightblue |
| |
Lightcoral |
| |
Lightcyan |
| |
Lightgoldenrodyellow |
| |
Lightgray |
| |
Lightgreen |
| |
Lightgrey |
| |
Lightpink |
| |
Lightsalmon |
| |
Lightseagreen |
| |
Lightskyblue |
| |
Lightslategray |
| |
Lightslategrey |
| |
Lightsteelblue |
| |
Lightyellow |
| |
Lime |
| |
Limegreen |
| |
Linen |
| |
Magenta |
| |
Maroon |
| |
Mediumaquamarine |
| |
Mediumblue |
| |
Mediumorchid |
| |
Mediumpurple |
| |
Mediumseagreen |
| |
Mediumslateblue |
| |
Mediumspringgreen |
| |
Mediumturquoise |
| |
Mediumvioletred |
| |
Midnightblue |
| |
Mintcream |
| |
Mistyrose |
| |
Moccasin |
| |
|
| |
|
| |
Oldlace |
| |
Olive |
| |
Olivedrab |
| |
Orange |
| |
Orangered |
| |
Orchid |
| |
Palegoldenrod |
| |
Palegreen |
| |
Paleturquoise |
| |
Palevioletred |
| |
Papayawhip |
| |
Peachpuff |
| |
Peru |
| |
Pink |
| |
Plum |
| |
Powderblue |
| |
Purple |
| |
Red |
| |
Rosybrown |
| |
Royalblue |
| |
Saddlebrown |
| |
Salmon |
| |
Sandybrown |
| |
Seagreen |
| |
Seashell |
| |
Sienna |
| |
Silver |
| |
Skyblue |
| |
Slateblue |
| |
Slategray |
| |
Slategrey |
| |
Snow |
| |
Springgreen |
| |
Steelblue |
| |
Tan |
| |
Teal |
| |
Thistle |
| |
Tomato |
| |
Turquoise |
| |
Violet |
| |
Wheat |
| |
White |
| |
Whitesmoke |
| |
Yellow |
| |
Yellowgreen |
val string_of_name : name -> string
val rgb_of_name : name -> int * int * int
0
and 255
.type
t =
| |
Name of |
(* |
A color by name
| *) |
| |
RGB of |
(* |
Red, Green and Blue values. Clipped to
0..255 by most (All?)
browsers. | *) |
| |
RGB_percent of |
(* |
RBG channels are specified as a percentage of their maximal value.
| *) |
| |
RGBA of |
(* |
Same as RGB with additionnal transparency argument. Opacity should be
between
0. (completely transparent) and 1. (completely opaque). | *) |
| |
RGBA_percent of |
(* |
RGB channels specified as percentage of their maximal value. Alpha
channel (opacity) is still a
0. to 1. float. | *) |
| |
HSL of |
(* |
Hue, Saturation and Lightness values. Hue is an angle in degree (in
interval
0..360 ). Saturation is a percentage (0..100 ) with 0
being colorless. Lightness is also a percentage (0..100 ) with 0
being black. | *) |
| |
HSLA of |
(* |
Same as HSL with an opacity argument between
0. and 1. . | *) |
val rgb : ?a:float -> int -> int -> int -> t
a
argument can be used to specify alpha channel (aka opacity).val hsl : ?a:float -> int -> int -> int -> t
a
argument can be used to specify alpha channel (aka opacity).typejs_t = private
Js.js_string Js.t
js_t
is a valid string representation of a CSS colorval string_of_t : t -> string
val js : t -> js_t
js c
is equivalent
to Js.string (string_of_t c)
but with a js_t
return type.val ml : js_t -> t
js
.val js_t_of_js_string : Js.js_string Js.t -> js_t
Invalid_argument