Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
OpenSpout\Common\Entity\Style\Color Class Reference

Static Public Member Functions

static rgb (int $red, int $green, int $blue)
 Returns an RGB color from R, G and B values.
 
static toARGB (string $rgbColor)
 Returns the ARGB color of the given RGB color, assuming that alpha value is always 1.
 

Public Attributes

const BLACK = '000000'
 Standard colors - based on Office Online.
 
const BLUE = '0070C0'
 
const DARK_BLUE = '002060'
 
const DARK_RED = 'C00000'
 
const GREEN = '00B050'
 
const LIGHT_BLUE = '00B0E0'
 
const LIGHT_GREEN = '92D040'
 
const ORANGE = 'FFC000'
 
const PURPLE = '7030A0'
 
const RED = 'FF0000'
 
const WHITE = 'FFFFFF'
 
const YELLOW = 'FFFF00'
 

Member Function Documentation

◆ rgb()

static OpenSpout\Common\Entity\Style\Color::rgb ( int $red,
int $green,
int $blue )
static

Returns an RGB color from R, G and B values.

Parameters
int$redRed component, 0 - 255
int$greenGreen component, 0 - 255
int$blueBlue component, 0 - 255
Return values
stringRGB color

◆ toARGB()

static OpenSpout\Common\Entity\Style\Color::toARGB ( string $rgbColor)
static

Returns the ARGB color of the given RGB color, assuming that alpha value is always 1.

Parameters
string$rgbColorRGB color like "FF08B2"
Return values
stringARGB color

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