PHP Класс Pop\Color\Space\Hex

Автор: Nick Sagona, III ([email protected])
Наследование: implements Pop\Color\Space\ColorInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$blue string Blue value
$green string Green value
$hex string Hex value
$red string Red value
$shorthand string Shorthand hex value

Открытые методы

Метод Описание
__construct ( string $hex ) : Hex Constructor
__toString ( ) : string Method to return the string value for printing output.
get ( integer $type = Pop\Color\Color::STRING, boolean $hash = false, boolean $short = false ) : string Method to get the full RGB hex value
getBlue ( ) : integer Method to get the blue hex value
getGreen ( ) : integer Method to get the green hex value
getRed ( ) : integer Method to get the red hex value

Защищенные методы

Метод Описание
isValid ( ) : boolean Method to determine if the hex value is valid.

Описание методов

__construct() публичный Метод

Instantiate the hex color object
public __construct ( string $hex ) : Hex
$hex string
Результат Hex

__toString() публичный Метод

Method to return the string value for printing output.
public __toString ( ) : string
Результат string

get() публичный Метод

Method to get the full RGB hex value
public get ( integer $type = Pop\Color\Color::STRING, boolean $hash = false, boolean $short = false ) : string
$type integer
$hash boolean
$short boolean
Результат string

getBlue() публичный Метод

Method to get the blue hex value
public getBlue ( ) : integer
Результат integer

getGreen() публичный Метод

Method to get the green hex value
public getGreen ( ) : integer
Результат integer

getRed() публичный Метод

Method to get the red hex value
public getRed ( ) : integer
Результат integer

isValid() защищенный Метод

Method to determine if the hex value is valid.
protected isValid ( ) : boolean
Результат boolean

Описание свойств

$blue защищенное свойство

Blue value
protected string $blue
Результат string

$green защищенное свойство

Green value
protected string $green
Результат string

$hex защищенное свойство

Hex value
protected string $hex
Результат string

$red защищенное свойство

Red value
protected string $red
Результат string

$shorthand защищенное свойство

Shorthand hex value
protected string $shorthand
Результат string