Rgb
extends AbstractColor
in package
Image RGB color class
Tags
Table of Contents
- $b : float
- Blue
- $g : float
- Green
- $r : float
- Red
- __construct() : mixed
- Constructor
- __toString() : string
- Method to print the color object
- getB() : float
- Get the blue value
- getG() : float
- Get the green value
- getR() : float
- Get the red value
- setB() : Rgb
- Set the blue value
- setG() : Rgb
- Set the green value
- setR() : Rgb
- Set the red value
- toCmyk() : Cmyk
- Convert to CMYK
- toGray() : Gray
- Convert to Gray
- toHex() : string
- Convert to hex string
Properties
$b
Blue
protected
float
$b
= 0
$g
Green
protected
float
$g
= 0
$r
Red
protected
float
$r
= 0
Methods
__construct()
Constructor
public
__construct(mixed $r, mixed $g, mixed $b) : mixed
Instantiate a PDF RGB Color object
Parameters
- $r : mixed
-
0 - 255
- $g : mixed
-
0 - 255
- $b : mixed
-
0 - 255
Return values
mixed —__toString()
Method to print the color object
public
__toString() : string
Return values
string —getB()
Get the blue value
public
getB() : float
Return values
float —getG()
Get the green value
public
getG() : float
Return values
float —getR()
Get the red value
public
getR() : float
Return values
float —setB()
Set the blue value
public
setB(mixed $b) : Rgb
Parameters
- $b : mixed
Tags
Return values
Rgb —setG()
Set the green value
public
setG(mixed $g) : Rgb
Parameters
- $g : mixed
Tags
Return values
Rgb —setR()
Set the red value
public
setR(mixed $r) : Rgb
Parameters
- $r : mixed
Tags
Return values
Rgb —toCmyk()
Convert to CMYK
public
toCmyk() : Cmyk
Return values
Cmyk —toGray()
Convert to Gray
public
toGray() : Gray
Return values
Gray —toHex()
Convert to hex string
public
toHex() : string