Color Essential

A simple color class returned from Config::get when the value at the key path is of type ‘color’.

Methods

.parse(value)

Parse a String or Object into a Color.

Argument Description

value

A String such as 'white', #ff00ff, or 'rgba(255, 15, 60, .75)' or an Object with red, green, blue, and alpha properties.

Return values

Returns a Color or null if it cannot be parsed.

::toHexString()

Return values

Returns a String in the form '#abcdef'.

::toRGBAString()

Return values

Returns a String in the form 'rgba(25, 50, 75, .9)'.