PHP Class Pop\Color\Space\Rgb

Author: Nick Sagona, III ([email protected])
Inheritance: implements Pop\Color\Space\ColorInterface
Exibir arquivo Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$blue integer Blue value
$green integer Green value
$red integer Red value

Public Methods

Method Description
__construct ( integer $r, integer $g, integer $b ) : Rgb Constructor
__toString ( ) : string Method to return the string value for printing output.
get ( integer $type = Pop\Color\Color::ASSOC_ARRAY, boolean $css = false ) : string | array Method to get the full RGB value
getBlue ( ) : integer Method to get the blue value
getGreen ( ) : integer Method to get the green value
getRed ( ) : integer Method to get the red value

Method Details

__construct() public method

Instantiate the RGB color object
public __construct ( integer $r, integer $g, integer $b ) : Rgb
$r integer
$g integer
$b integer
return Rgb

__toString() public method

Method to return the string value for printing output.
public __toString ( ) : string
return string

get() public method

Method to get the full RGB value
public get ( integer $type = Pop\Color\Color::ASSOC_ARRAY, boolean $css = false ) : string | array
$type integer
$css boolean
return string | array

getBlue() public method

Method to get the blue value
public getBlue ( ) : integer
return integer

getGreen() public method

Method to get the green value
public getGreen ( ) : integer
return integer

getRed() public method

Method to get the red value
public getRed ( ) : integer
return integer

Property Details

$blue protected_oe property

Blue value
protected int $blue
return integer

$green protected_oe property

Green value
protected int $green
return integer

$red protected_oe property

Red value
protected int $red
return integer