color

README

Library that converts between different color formats. Right now it deals with
HSL, HSLA, RGB and RGBA formats.

The goal for this library is to provide easy handling of colors on the web, when working
with js_of_ocaml.

Examples

# Color.to_hexstring (Color.of_rgb 12 121 229);;
- : "#0c79e5"

The library uses the color type from Gg.

# Color.to_css_hsla (Gg.Color.red);;
- : string = "hsl(0.00, 100.00%, 50.00%)"

# Color.to_css_rgba (Gg.Color.red);;
- : string = "rgb(255, 0, 0)"

# Color.to_hexstring (Color.complementary (Gg.Color.red));;
- : string = "#00ffff"

Credit

Based on purescript-colors

Install
Published
21 Sep 2018
Sources
color-0.2.0.tbz
md5=36a5d45385a02f96d07d40d1b0fbcf8a
Dependencies
alcotest
with-test
ocaml
>= "4.05.0"
Reverse Dependencies