A standard Color type allowing packages that produce or consume colors to easily interoperate.
This project is a Gren port of avh4/elm-color.
import Color exposing ( Color )
import Html exposing ( Html )
import Html.Attributes exposing ( style )
view : Color -> Html msg
view foreground =
let
hue = ( Color.toHsla foreground ).hue
borderColor = Color.hsla hue 0.75 0.5 0.8
in
Html.div
[ style "background-color" ( Color.toCssString Color.lightOrange )
, style "color" ( Color.toCssString foreground )
, style "border-color" ( Color.toCssString borderColor )
]
[ Html.text "(ᵔᴥᵔ)" ]
This package also provides an "aesthetically reasonable" set of common colors.
