/css_colors

Color manipulation library for Elixir applications

Primary LanguageElixirMIT LicenseMIT

CssColors

Library for parsing, writing and manipulation (css) colors.

Heavily inspired by Sass color functions.

Installation

Add css_colors to your list of dependencies in mix.exs:

def deps do
  [{:css_colors, "~> 0.2.0"}]
end

Documentation

See the full documentation on HexDocs.

Examples

iex> "#123456" |> parse! |> lighten(0.2) |> to_string
"hsl(210, 65%, 40%)"

iex> to_string mix(parse!("#f00"), parse!("#00f"), 0.25)
"#4000BF"