\Pop\Image\ColorRgb

Image RGB color class

Summary

Methods
Properties
Constants
__toString()
__construct()
setR()
setG()
setB()
getR()
getG()
getB()
toCmyk()
toGray()
toHex()
No public properties found
No constants found
No protected methods found
$r
$g
$b
N/A
No private methods found
No private properties found
N/A

Properties

$r

$r : float

Red

Type

float

$g

$g : float

Green

Type

float

$b

$b : float

Blue

Type

float

Methods

__toString()

__toString() : string

Method to print the color object

Returns

string

__construct()

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

Constructor

Instantiate a PDF RGB Color object

Parameters

mixed $r

0 - 255

mixed $g

0 - 255

mixed $b

0 - 255

setR()

setR(mixed  $r) : \Pop\Image\Color\Rgb

Set the red value

Parameters

mixed $r

Throws

\OutOfRangeException

Returns

\Pop\Image\Color\Rgb

setG()

setG(mixed  $g) : \Pop\Image\Color\Rgb

Set the green value

Parameters

mixed $g

Throws

\OutOfRangeException

Returns

\Pop\Image\Color\Rgb

setB()

setB(mixed  $b) : \Pop\Image\Color\Rgb

Set the blue value

Parameters

mixed $b

Throws

\OutOfRangeException

Returns

\Pop\Image\Color\Rgb

getR()

getR() : float

Get the red value

Returns

float

getG()

getG() : float

Get the green value

Returns

float

getB()

getB() : float

Get the blue value

Returns

float

toHex()

toHex() : string

Convert to hex string

Returns

string