y047aka/elm-hsl-color - version: 1.0.2

for more information visit the package's GitHub page

Package contains the following modules:

elm-hsl-color

This package is the HSL version of elm-color

Example

import HslaColor exposing (HslaColor)
import Html exposing (Html)
import Html.Attributes exposing (style)

view : HslaColor -> Html msg
view foreground =
    let
        hue =
            (HslaColor.toHsla foreground).hue

        borderColor =
            HslaColor.hsla hue 0.75 0.5 0.8
    in
    Html.div
        [ style "background-color" (HslaColor.toCssString HslaColor.lightOrange)
        , style "color" (HslaColor.toCssString foreground)
        , style "border-color" (HslaColor.toCssString borderColor)
        ]
        [ Html.text "(ᵔᴥᵔ)" ]