Documentation

Color
in package

Table of Contents

$a  : int
$b  : int
$g  : int
$r  : int
__construct()  : mixed
fromARGB()  : Color
Returns a Color from the supplied ARGB colour code (32-bit)
fromRGB()  : Color
Returns a Color from the supplied RGB colour code (24-bit)
fromRGBA()  : Color
Returns a Color from the supplied RGBA colour code (32-bit)
getA()  : int
Returns the alpha (opacity) value of this colour.
getB()  : int
Returns the blue value of this colour.
getG()  : int
Returns the green value of this colour.
getR()  : int
Retuns the red value of this colour.
mix()  : Color
Mixes the supplied list of colours together to produce a result colour.
toARGB()  : int
Returns an ARGB 32-bit colour value.
toRGBA()  : int
Returns an RGBA 32-bit colour value.

Properties

Methods

__construct()

public __construct(int $r, int $g, int $b[, int $a = 0xff ]) : mixed
Parameters
$r : int
$g : int
$b : int
$a : int = 0xff
Return values
mixed

fromARGB()

Returns a Color from the supplied ARGB colour code (32-bit)

public static fromARGB(int $code) : Color
Parameters
$code : int
Return values
Color

fromRGB()

Returns a Color from the supplied RGB colour code (24-bit)

public static fromRGB(int $code) : Color
Parameters
$code : int
Return values
Color

fromRGBA()

Returns a Color from the supplied RGBA colour code (32-bit)

public static fromRGBA(int $c) : Color
Parameters
$c : int
Return values
Color

getA()

Returns the alpha (opacity) value of this colour.

public getA() : int
Return values
int

getB()

Returns the blue value of this colour.

public getB() : int
Return values
int

getG()

Returns the green value of this colour.

public getG() : int
Return values
int

getR()

Retuns the red value of this colour.

public getR() : int
Return values
int

mix()

Mixes the supplied list of colours together to produce a result colour.

public static mix(Color $color1, Color ...$colors) : Color
Parameters
$color1 : Color
$colors : Color
Return values
Color

toARGB()

Returns an ARGB 32-bit colour value.

public toARGB() : int
Return values
int

toRGBA()

Returns an RGBA 32-bit colour value.

public toRGBA() : int
Return values
int

Search results