Documentation

ImageColor
in package

Represent RGB color (0..255) with opacity (0..1).

Table of Contents

Properties

$blue  : int
$green  : int
$opacity  : float
$red  : int

Methods

hex()  : self
Accepts formats #RRGGBB, #RRGGBBAA, #RGB, #RGBA
rgb()  : self
toRGBA()  : array<string|int, mixed>
__construct()  : mixed

Properties

Methods

hex()

Accepts formats #RRGGBB, #RRGGBBAA, #RGB, #RGBA

public static hex(string $hex) : self
Parameters
$hex : string
Return values
self

rgb()

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
self

toRGBA()

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

        
On this page

Search results