Hex represents the Hex color format

author Mikee Franklin

 Methods

Create a new Hex

__construct(int $hex) 

Parameters

$hex

int

the hexidecimal value (i.e. 0x000000)

A string representation of this color in the current format

__toString() : string

Returns

stringThe color in format: RRGGBB

Create a new Hex

create(int $hex) : \MischiefCollective\ColorJizz\Formats\Hex

Parameters

$hex

int

the hexidecimal value (i.e. 0x000000)

Returns

Create a new Hex from a string.

fromString(string $str) : \MischiefCollective\ColorJizz\Formats\Hex

Parameters

$str

string

Can be a color name or string hex value (i.e. "FFFFFF")

Returns

Convert the color to CIELCh format

toCIELCh() : \MischiefCollective\ColorJizz\Formats\CIELCh

Returns

Convert the color to CIELab format

toCIELab() : \MischiefCollective\ColorJizz\Formats\CIELab

Returns

Convert the color to CMY format

toCMY() : \MischiefCollective\ColorJizz\Formats\CMY

Returns

Convert the color to CMYK format

toCMYK() : \MischiefCollective\ColorJizz\Formats\CMYK

Returns

Convert the color to HSV format

toHSV() : \MischiefCollective\ColorJizz\Formats\HSV

Returns

Convert the color to Hex format

toHex() : \MischiefCollective\ColorJizz\Formats\Hex

Returns

Convert the color to RGB format

toRGB() : \MischiefCollective\ColorJizz\Formats\RGB

Returns

Convert the color to XYZ format

toXYZ() : \MischiefCollective\ColorJizz\Formats\XYZ

Returns

Convert the color to Yxy format

toYxy() : \MischiefCollective\ColorJizz\Formats\Yxy

Returns

 Properties

 

$hex

$hex 

 

$color_names

$color_names