Properties

$pixel

$pixel : \ImagickPixel

ImagickPixel containing current color information

Type

\ImagickPixel —

Methods

initFromInteger()

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

Initiates color object from integer

Parameters

int $value

Returns

\Intervention\Image\AbstractColor —

initFromArray()

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

Initiates color object from given array

Parameters

mixed $array

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\Imagick\ImagickPixel  $value) : \Intervention\Image\AbstractColor

Initiates color object from given ImagickPixel object

Parameters

\Intervention\Image\Imagick\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 —

getRedValue()

getRedValue() : int

Returns RGB red value of current color

Returns

int —

getGreenValue()

getGreenValue() : int

Returns RGB green value of current color

Returns

int —

getBlueValue()

getBlueValue() : int

Returns RGB blue value of current color

Returns

int —

getAlphaValue()

getAlphaValue() : float

Returns RGB alpha value of current color

Returns

float —

getPixel()

getPixel() : \ImagickPixel

Returns current color as ImagickPixel

Returns

\ImagickPixel —

rgbaFromString()

rgbaFromString(string  $value) : array

Reads RGBA values from string into array

Parameters

string $value

Returns

array —

setPixel()

setPixel(mixed  $r, mixed  $g, mixed  $b, mixed  $a = null) : \ImagickPixel

Initiates ImagickPixel from given RGBA values

Parameters

mixed $r
mixed $g
mixed $b
mixed $a

Returns

\ImagickPixel —

rgb2alpha()

rgb2alpha(int  $value) : float

Calculates RGBA integer alpha value into float value

Parameters

int $value

Returns

float —