rakutentech/r10/6.2.0

NOTE: the latest version is 7.0.0

R10.Color.Utils

Utilities for colors.

There are two competing color types in this library:

  • Color.Color (from avh4/elm-color)
  • Color (from mdgriffith/elm-ui)

The default color type is Color.

fromColorColor : Color -> Color

Transform a Color.Color into an Color.

toColorColor : Color -> Color

Transform an Color into a Color.Color.

fromHex : String -> Color

Convert a string containing an hexadecimal number into an Color.

fromLightToDark : Color -> Color

Convert a color from Light Mode to Dark Mode. This function works for Color.Color type.

setAlpha : Float -> Color -> Color

Change the alpha channel in a color. This function works for Color.Color type.

toCssRgba : Color -> String

Convert an Color to a RGBA string, for example: rgba(100, 200, 0, 1)

fromHexToColorColor : String -> Color

Convert a string containing an hexadecimal number into a Color.Color.