colorhash

Package Version Hex Docs

gleam add colorhash@1
import colorhash

pub fn main() -> Nil {
  colorhash.new() |> colorhash.to_hsl("hello world")
  // -> #(188.1416781292985, 0.65, 0.65)

  colorhash.new() |> colorhash.to_rgb("hello world")
  // -> #(108, 208, 224)

  colorhash.new() |> colorhash.to_hex("hello world")
  // -> "#6CD0E0"
}

Further documentation can be found at https://hexdocs.pm/colorhash.

Development

gleam run   # Run the project
gleam test  # Run the tests
Search Document