RGB represents the RGB color format

author Mikee Franklin

 Methods

Create a new RGB color

__construct(float $r, float $g, float $b) 

Parameters

$r

float

The red (0-255)

$g

float

The green (0-255)

$b

float

The blue (0-255)

Get the blue value (rounded)

getB() : int

Returns

intThe blue value

Get the green value (rounded)

getG() : int

Returns

intThe green value

Get the red value (rounded)

getR() : int

Returns

intThe red value

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

A string representation of this color in the current format

toString() : string

Returns

stringThe color in format: $r,$g,$b (rounded)

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

 

$b

$b 

 

$g

$g 

 

$r

$r