Library for parsing, writing and manipulation (css) colors.
Heavily inspired by Sass color functions.
Add css_colors to your list of dependencies in mix.exs
:
def deps do
[{:css_colors, "~> 0.2.0"}]
end
See the full documentation on HexDocs.
iex> "#123456" |> parse! |> lighten(0.2) |> to_string
"hsl(210, 65%, 40%)"
iex> to_string mix(parse!("#f00"), parse!("#00f"), 0.25)
"#4000BF"