lucamug / style-framework / Framework.Color.Extra

Utilities

darken : Basics.Float -> Element.Color -> Element.Color

Decrease the lightning of a color

desaturate : Basics.Float -> Element.Color -> Element.Color

Decrease the saturation of a color

lighten : Basics.Float -> Element.Color -> Element.Color

Increase the lightning of a color

maximumContrast : Element.Color -> Element.Color -> Element.Color -> Element.Color

Returns the color with the highest contrast to the base color.

saturate : Basics.Float -> Element.Color -> Element.Color

Increase the saturation of a color

Convertions to/from Hex

colorToHex : Element.Color -> String

Converts a color to a hexadecimal string.

hexToColor : String -> Element.Color

Converts a string to a color.

Convertions to/from Color.Color

fromColor : Color -> Element.Color

Convert a Color.Color into an Element.Color

toColor : Element.Color -> Color

Convert an Element.Color into a Color.Color