Color
in package
Pop color class
Tags
Table of Contents
Methods
- cmyk() : Cmyk
- Instantiate a CMYK color object
- grayscale() : Grayscale
- Instantiate a grayscale color object
- hex() : Hex
- Instantiate a Hex color object
- hsl() : Hsl
- Instantiate an HSL color object
- parse() : ColorInterface
- Parse color from string
- parseColorValues() : array<string|int, mixed>
- Parse color values from string
- rgb() : Rgb
- Instantiate an RGB color object
Methods
cmyk()
Instantiate a CMYK color object
public
static cmyk(int $c, int $m, int $y, int $k) : Cmyk
Parameters
- $c : int
- $m : int
- $y : int
- $k : int
Return values
Cmykgrayscale()
Instantiate a grayscale color object
public
static grayscale(int $gray) : Grayscale
Parameters
- $gray : int
Return values
Grayscalehex()
Instantiate a Hex color object
public
static hex(string $hex) : Hex
Parameters
- $hex : string
Return values
Hexhsl()
Instantiate an HSL color object
public
static hsl(int $h, int $s, int $l[, float|null $a = null ]) : Hsl
Parameters
- $h : int
- $s : int
- $l : int
- $a : float|null = null
Return values
Hslparse()
Parse color from string
public
static parse(string $colorString) : ColorInterface
Parameters
- $colorString : string
Tags
Return values
ColorInterfaceparseColorValues()
Parse color values from string
public
static parseColorValues(string $colorString[, bool $comma = true ]) : array<string|int, mixed>
Parameters
- $colorString : string
- $comma : bool = true
Return values
array<string|int, mixed>rgb()
Instantiate an RGB color object
public
static rgb(int $r, int $g, int $b[, float|null $a = null ]) : Rgb
Parameters
- $r : int
- $g : int
- $b : int
- $a : float|null = null