\Pop\CssColor

Pop CSS color class

Summary

Methods
Properties
Constants
rgb()
hsl()
hex()
parse()
parseColorValues()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

rgb()

rgb(integer  $r, integer  $g, integer  $b, float  $a = null) : \Pop\Css\Color\Rgb

Instantiate an RGB color object

Parameters

integer $r
integer $g
integer $b
float $a

Returns

\Pop\Css\Color\Rgb

hsl()

hsl(integer  $h, integer  $s, integer  $l, float  $a = null) : \Pop\Css\Color\Hsl

Instantiate an RGB color object

Parameters

integer $h
integer $s
integer $l
float $a

Returns

\Pop\Css\Color\Hsl

hex()

hex(string  $hex) : \Pop\Css\Color\Hex

Instantiate an RGB color object

Parameters

string $hex

Returns

\Pop\Css\Color\Hex

parse()

parse(string  $colorString) : \Pop\Css\Color\ColorInterface|object

Parse CSS color from string

Parameters

string $colorString

Throws

\Pop\Css\Color\Exception

Returns

\Pop\Css\Color\ColorInterface|object

parseColorValues()

parseColorValues(string  $colorString) : array

Parse CSS color values from string

Parameters

string $colorString

Throws

\Pop\Css\Color\Exception

Returns

array