PocketMine-MP 5.15.1 git-be6754494fdbbb9dd57c058ba0e33a4a78c4581f
pocketmine\color\Color Class Reference
+ Collaboration diagram for pocketmine\color\Color:

Public Member Functions

 __construct (int $r, int $g, int $b, int $a=0xff)
 
 equals (self $other)
 
 getA ()
 
 getB ()
 
 getG ()
 
 getR ()
 
 toARGB ()
 
 toRGBA ()
 

Static Public Member Functions

static fromARGB (int $code)
 
static fromRGB (int $code)
 
static fromRGBA (int $code)
 
static mix (Color $color1, Color ... $colors)
 

Detailed Description

Definition at line 29 of file Color.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\color\Color::__construct ( int  $r,
int  $g,
int  $b,
int  $a = 0xff 
)

Definition at line 35 of file Color.php.

Member Function Documentation

◆ equals()

pocketmine\color\Color::equals ( self  $other)

Returns whether the two colors are equivalent.

Definition at line 129 of file Color.php.

◆ fromARGB()

static pocketmine\color\Color::fromARGB ( int  $code)
static

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

Definition at line 101 of file Color.php.

◆ fromRGB()

static pocketmine\color\Color::fromRGB ( int  $code)
static

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

Definition at line 94 of file Color.php.

◆ fromRGBA()

static pocketmine\color\Color::fromRGBA ( int  $code)
static

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

Definition at line 115 of file Color.php.

◆ getA()

pocketmine\color\Color::getA ( )

Returns the alpha (opacity) value of this colour.

Definition at line 45 of file Color.php.

◆ getB()

pocketmine\color\Color::getB ( )

Returns the blue value of this colour.

Definition at line 66 of file Color.php.

◆ getG()

pocketmine\color\Color::getG ( )

Returns the green value of this colour.

Definition at line 59 of file Color.php.

◆ getR()

pocketmine\color\Color::getR ( )

Returns the red value of this colour.

Definition at line 52 of file Color.php.

◆ mix()

static pocketmine\color\Color::mix ( Color  $color1,
Color ...  $colors 
)
static

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

Parameters
Color...$colors

Definition at line 75 of file Color.php.

◆ toARGB()

pocketmine\color\Color::toARGB ( )

Returns an ARGB 32-bit colour value.

Definition at line 108 of file Color.php.

◆ toRGBA()

pocketmine\color\Color::toRGBA ( )

Returns an RGBA 32-bit colour value.

Definition at line 122 of file Color.php.


The documentation for this class was generated from the following file: