eskimoblood/elm-color-extra/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Color.Extra

A library for creating and manipulating colors.

Color adjustment

darken : Float -> Color -> Color

Decrease the lightning of a colosds

lighten : Float -> Color -> Color

Increase the lightning of a color

saturate : Float -> Color -> Color

Increase the saturation of a color

desaturate : Float -> Color -> Color

Decrease the saturation of a color

rotateHue : Float -> Color -> Color

Change the hue of a color. The angle value must be in degrees

Mixing colors

blend : Color -> Color -> Float -> Color

Linear interpolation of two colors.

Gradient

type alias GradientStop =
( Float, Color )

A color and a stop value that indicates where the color appears in a gradient. The stop value must be between 0 and 1.

type alias Gradient =
List GradientStop
type alias Palette =
List Color
gradient : Gradient -> Int -> Palette

Create a new Palette from a given Gradient, with a given size.

#Helper

toCssString : Color -> String

convert a color into an CSS rgba color string