gleam-community/colour
A package for a standard Colour type, conversions, and other utilities.
✨ This project is written in pure Gleam so you can use it anywhere Gleam runs: Erlang, Elixir, Node, Deno, and the browser!
Quickstart
import gleam_community/colour
import gleam_community/colour/accessibility
pub fn main() {
let foreground = colour.from_hsl(h: 0.858, s: 1.0, l: 0.843)
let background_options = [colour.light_grey, colour.dark_grey]
let background = accessibility.maximum_contrast(foreground, background_options)
}
Installation
gleam_community
packages are published to hex.pm
with the prefix gleam_community_
. You can add them to your Gleam projects directly:
gleam add gleam_community_colour
The docs can be found over at hexdocs.pm.