\Intervention\ImageAbstractColor

Summary

Methods
Properties
Constants
initFromInteger()
initFromArray()
initFromString()
initFromObject()
initFromRgb()
initFromRgba()
getInt()
getHex()
getArray()
getRgba()
differs()
__construct()
parse()
format()
No public properties found
No constants found
rgbaFromString()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

initFromInteger()

initFromInteger(int  $value) : \Intervention\Image\AbstractColor

Initiates color object from integer

Parameters

int $value

Returns

\Intervention\Image\AbstractColor —

initFromArray()

initFromArray(array  $value) : \Intervention\Image\AbstractColor

Initiates color object from given array

Parameters

array $value

Returns

\Intervention\Image\AbstractColor —

initFromString()

initFromString(string  $value) : \Intervention\Image\AbstractColor

Initiates color object from given string

Parameters

string $value

Returns

\Intervention\Image\AbstractColor —

initFromObject()

initFromObject(\Intervention\Image\ImagickPixel  $value) : \Intervention\Image\AbstractColor

Initiates color object from given ImagickPixel object

Parameters

\Intervention\Image\ImagickPixel $value

Returns

\Intervention\Image\AbstractColor —

initFromRgb()

initFromRgb(int  $r, int  $g, int  $b) : \Intervention\Image\AbstractColor

Initiates color object from given R, G and B values

Parameters

int $r
int $g
int $b

Returns

\Intervention\Image\AbstractColor —

initFromRgba()

initFromRgba(int  $r, int  $g, int  $b, float  $a) : \Intervention\Image\AbstractColor

Initiates color object from given R, G, B and A values

Parameters

int $r
int $g
int $b
float $a

Returns

\Intervention\Image\AbstractColor —

getInt()

getInt() : int

Calculates integer value of current color instance

Returns

int —

getHex()

getHex(string  $prefix) : string

Calculates hexadecimal value of current color instance

Parameters

string $prefix

Returns

string —

getArray()

getArray() : array

Calculates RGB(A) in array format of current color instance

Returns

array —

getRgba()

getRgba() : string

Calculates RGBA in string format of current color instance

Returns

string —

differs()

differs(\Intervention\Image\AbstractColor  $color, int  $tolerance) : bool

Determines if current color is different from given color

Parameters

\Intervention\Image\AbstractColor $color
int $tolerance

Returns

bool —

__construct()

__construct(mixed  $value = null) : mixed

Creates new instance

Parameters

mixed $value

Returns

mixed —

parse()

parse(mixed  $value) : \Intervention\Image\AbstractColor

Parses given value as color

Parameters

mixed $value

Returns

\Intervention\Image\AbstractColor —

format()

format(string  $type) : mixed

Formats current color instance into given format

Parameters

string $type

Returns

mixed —

rgbaFromString()

rgbaFromString(string  $value) : array

Reads RGBA values from string into array

Parameters

string $value

Returns

array —