PHP Class Pop\Color\Space\Hsb

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

Protected Properties

Property Type Description
$brightness integer Brightness percentage value
$hue integer Hue angle value in degrees
$saturation integer Saturation percentage value

Public Methods

Method Description
__construct ( integer $h, integer $s, integer $b ) : Hsb 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 HSB value
getBrightness ( ) : integer Method to get the brightness value
getHue ( ) : integer Method to get the hue value
getSaturation ( ) : integer Method to get the saturation value

Method Details

__construct() public method

Instantiate the RGB color object
public __construct ( integer $h, integer $s, integer $b ) : Hsb
$h integer
$s integer
$b integer
return Hsb

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

getBrightness() public method

Method to get the brightness value
public getBrightness ( ) : integer
return integer

getHue() public method

Method to get the hue value
public getHue ( ) : integer
return integer

getSaturation() public method

Method to get the saturation value
public getSaturation ( ) : integer
return integer

Property Details

$brightness protected_oe property

Brightness percentage value
protected int $brightness
return integer

$hue protected_oe property

Hue angle value in degrees
protected int $hue
return integer

$saturation protected_oe property

Saturation percentage value
protected int $saturation
return integer