PHP Class Pop\Color\Space\Hsb

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

Protected Properties

Свойство Type Description
$brightness integer Brightness percentage value
$hue integer Hue angle value in degrees
$saturation integer Saturation percentage value

Méthodes publiques

Méthode 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 méthode

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

__toString() public méthode

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

get() public méthode

Method to get the full HSB value
public get ( integer $type = Pop\Color\Color::ASSOC_ARRAY ) : string | array
$type integer
Résultat string | array

getBrightness() public méthode

Method to get the brightness value
public getBrightness ( ) : integer
Résultat integer

getHue() public méthode

Method to get the hue value
public getHue ( ) : integer
Résultat integer

getSaturation() public méthode

Method to get the saturation value
public getSaturation ( ) : integer
Résultat integer

Property Details

$brightness protected_oe property

Brightness percentage value
protected int $brightness
Résultat integer

$hue protected_oe property

Hue angle value in degrees
protected int $hue
Résultat integer

$saturation protected_oe property

Saturation percentage value
protected int $saturation
Résultat integer