PHP Class Pop\Color\Space\Cmyk

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

Protected Properties

Property Type Description
$black integer Black percentage value
$cyan integer Cyan percentage value
$magenta integer Magenta percentage value
$yellow integer Yellow percentage value

Public Methods

Method Description
__construct ( integer $c, integer $m, integer $y, integer $k ) : Cmyk Constructor
__toString ( ) : string Method to return the string value for printing output.
get ( integer $type = Pop\Color\Color::ASSOC_ARRAY ) : string | array Method to get the full CMYK value
getBlack ( ) : integer Method to get the black value
getCyan ( ) : integer Method to get the cyan value
getMagenta ( ) : integer Method to get the magenta value
getYellow ( ) : integer Method to get the yellow value

Method Details

__construct() public method

Instantiate the CMYK color object
public __construct ( integer $c, integer $m, integer $y, integer $k ) : Cmyk
$c integer
$m integer
$y integer
$k integer
return Cmyk

__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 CMYK value
public get ( integer $type = Pop\Color\Color::ASSOC_ARRAY ) : string | array
$type integer
return string | array

getBlack() public method

Method to get the black value
public getBlack ( ) : integer
return integer

getCyan() public method

Method to get the cyan value
public getCyan ( ) : integer
return integer

getMagenta() public method

Method to get the magenta value
public getMagenta ( ) : integer
return integer

getYellow() public method

Method to get the yellow value
public getYellow ( ) : integer
return integer

Property Details

$black protected property

Black percentage value
protected int $black
return integer

$cyan protected property

Cyan percentage value
protected int $cyan
return integer

$magenta protected property

Magenta percentage value
protected int $magenta
return integer

$yellow protected property

Yellow percentage value
protected int $yellow
return integer