ColorJizz is the base class that all color objects extend

author Mikee Franklin

 Methods

analogous()

analogous($includeSelf) 

Parameters

$includeSelf

Modify the brightness by $brightnessModifier

brightness(int $brightnessModifier) : \MischiefCollective\ColorJizz\ColorJizz

Parameters

$brightnessModifier

int

Value to modify by

Returns

Return the opposite, complimentary color

complement() : \MischiefCollective\ColorJizz\ColorJizz

Returns

Find the distance to the destination color

distance(MischiefCollective\ColorJizz\ColorJizz $destinationColor) : int

Parameters

$destinationColor

\MischiefCollective\ColorJizz\ColorJizz

The destination color

Returns

intdistance to destination color

equal()

equal($parts, $includeSelf) 

Parameters

$parts

$includeSelf

Return a greyscale version of the current color

greyscale() : \MischiefCollective\ColorJizz\ColorJizz

Returns

Modify the hue by $degreeModifier degrees

hue(int $degreeModifier) : \MischiefCollective\ColorJizz\ColorJizz

Parameters

$degreeModifier

int

Degrees to modify by

Returns

Match the current color to the closest from the array $palette

match(array $palette) : \MischiefCollective\ColorJizz\ColorJizz

Parameters

$palette

array

An array of ColorJizz objects to match against

Returns

range()

range($destinationColor, $steps, $includeSelf) 

Parameters

$destinationColor

$steps

$includeSelf

rectangle()

rectangle($sideLength, $includeSelf) 

Parameters

$sideLength

$includeSelf

Modify the saturation by $brightnessModifier

saturation(int $satModifier) : \MischiefCollective\ColorJizz\ColorJizz

Parameters

$satModifier

int

Value to modify by

Returns

split()

split($includeSelf) 

Parameters

$includeSelf

Find complimentary colors

sweetspot(int $includeSelf) : \MischiefCollective\ColorJizz\ColorJizz[]

Parameters

$includeSelf

int

Include the current color in the return array

Returns

\MischiefCollective\ColorJizz\ColorJizz[]Array of complimentary colors

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

Find the closest websafe color

websafe() : \MischiefCollective\ColorJizz\ColorJizz

Returns

 Properties

 

$toSelf

$toSelf