package color
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
md5=8bb06d9bb169c29f17699fb93809db94
sha256=1ffa724cc16fe04aa253a8591eae26b22274f1492d64888f6fb8c2f7165cedbc
Description
Library that converts between different color formats. Right now it deals with RGB[A], HSL[A], OkLab, and Oklch formats. All those format convert to and from [Gg.Color.t]
Added to opam-repository:
README
Color: conversions between different color formats
Color is a library that converts between different color formats. Right now it deals with RGB[A], HSL[A], OkLab, and Oklch formats. All those format convert to and from Gg.Color.t (from Gg).
The goal for this library is to provide easy handling of colors on the web, when working with js_of_ocaml.
Examples
The library uses the color type from Gg as a bridge between other models.
# Color.Rgb.(v 12 121 229 |> to_gg) |> Color.to_hexstring ;;
- : "#0c79e5"
# Gg.Color.red |> Color.Hsl.from_gg |> Color.Hsl.to_css ;;
- : string = "hsl(0.00 100.00% 50.00%)"
# Gg.Color.red |> Color.Rgb.from_gg |> Color.Rgb.to_css ;;
- : string = "rgb(255 0 0)"
# Gg.Color.red |> Color.complementary |> Color.to_hexstring ;;
- : string = "#00a9db"Credit
Based on purescript-colors
Dev Dependencies (3)
-
ocamlformat
= "0.26.2" & with-dev-setup -
ocaml-lsp-server
with-dev-setup -
alcotest
with-test
Optional Dependencies
None
Used by (4)
Conflicts
None
Build status
Results of building color with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.3.0 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure