dividat / elm-color-mixing

Color mixing in elm!

Home Page:http://package.elm-lang.org/packages/mdgriffith/elm-color-mixing/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elm Color Mixing

Functions to mix color.

Use the Elm Core Color type to create your colors and this library to mix them.

This library is modeled off of the LESSCSS color functions. See their documentation for general descriptions of each color operation.

Working with elm-css

While elm-css do not use Color internally (see issue 76). You can use Color.Mixing with a small helper, like:

import Color.Mixing exposing (..)
import Color exposing (Color)
import Css

cssColor : Color -> Css.Color
cssColor color =
    let
        { red, green, blue, alpha } =
            Color.toRgb color
    in
        Css.rgba red green blue alpha

About

Color mixing in elm!

http://package.elm-lang.org/packages/mdgriffith/elm-color-mixing/latest

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Elm 100.0%