ImageColor
in package
Represent RGB color (0..255) with opacity (0..1).
Table of Contents
Properties
Methods
- hex() : self
- Accepts formats #RRGGBB, #RRGGBBAA, #RGB, #RGBA
- rgb() : self
- toRGBA() : array<string|int, mixed>
- __construct() : mixed
Properties
$blue
public
int
$blue
$green
public
int
$green
$opacity
public
float
$opacity
= 1
$red
public
int
$red
Methods
hex()
Accepts formats #RRGGBB, #RRGGBBAA, #RGB, #RGBA
public
static hex(string $hex) : self
Parameters
- $hex : string
Return values
selfrgb()
public
static rgb(int $red, int $green, int $blue[, float $opacity = 1 ]) : self
Parameters
- $red : int
- $green : int
- $blue : int
- $opacity : float = 1
Return values
selftoRGBA()
public
toRGBA() : array<string|int, mixed>
Return values
array<string|int, mixed>__construct()
private
__construct(int $red, int $green, int $blue[, float $opacity = 1 ]) : mixed
Parameters
- $red : int
- $green : int
- $blue : int
- $opacity : float = 1