Package-level declarations

Types

Link copied to clipboard
interface ColorDecoder

A strategy to decode a Color from a raw string.

Link copied to clipboard

Decodes a Color from a hexadecimal string (e.g. #FF0000).

Link copied to clipboard

Decodes a Color from an HSV or HSL string (e.g. hsv(208, 70, 66) or hsl(208, 54, 43)).

Link copied to clipboard

Decodes a Color from the name (case-insensitive) of a NamedColor (e.g. red, GREEN, bLuE, aliceblue).

Link copied to clipboard

Decodes a Color from an RGBA string (e.g. rgba(255, 100, 25, 0.5)).

Link copied to clipboard

Decodes a Color from an RGB string (e.g. rgb(255, 100, 25)).

Functions

Link copied to clipboard
fun Color.Companion.decode(raw: String, vararg decoders: ColorDecoder = arrayOf( HexColorDecoder, RgbColorDecoder, RgbaColorDecoder, HsvHslColorDecoder, NamedColorDecoder, )): Color?

Decodes a Color from a raw string using the first decoder that successfully decodes it.

Link copied to clipboard
fun Color.Companion.from(colormathColor: Color): Color