Color

Summary

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

Class Methods

parse(value)

Parse a String or Object into a Color.

Parameters
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.

Returns
Return Values

Returns a Color or null if it cannot be parsed.

Instance Methods

toHexString()

Returns
Return Values

Returns a String in the form '#abcdef'.

toRGBAString()

Returns
Return Values

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