|
static | rgb ($red, $green, $blue) |
| Returns an RGB color from R, G and B values.
|
|
static | toARGB ($rgbColor) |
| Returns the ARGB color of the given RGB color, assuming that alpha value is always 1.
|
|
|
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' |
|
◆ convertColorComponentToHex()
static Box\Spout\Common\Entity\Style\Color::convertColorComponentToHex |
( |
| $colorComponent | ) |
|
|
staticprotected |
Converts the color component to its corresponding hexadecimal value.
- Parameters
-
int | $colorComponent | Color component, 0 - 255 |
- Return values
-
string | Corresponding hexadecimal value, with a leading 0 if needed. E.g "0f", "2d" |
◆ rgb()
static Box\Spout\Common\Entity\Style\Color::rgb |
( |
| $red, |
|
|
| $green, |
|
|
| $blue ) |
|
static |
Returns an RGB color from R, G and B values.
- Parameters
-
int | $red | Red component, 0 - 255 |
int | $green | Green component, 0 - 255 |
int | $blue | Blue component, 0 - 255 |
- Return values
-
◆ throwIfInvalidColorComponentValue()
static Box\Spout\Common\Entity\Style\Color::throwIfInvalidColorComponentValue |
( |
| $colorComponent | ) |
|
|
staticprotected |
Throws an exception is the color component value is outside of bounds (0 - 255)
- Parameters
-
- Exceptions
-
- Return values
-
◆ toARGB()
static Box\Spout\Common\Entity\Style\Color::toARGB |
( |
| $rgbColor | ) |
|
|
static |
Returns the ARGB color of the given RGB color, assuming that alpha value is always 1.
- Parameters
-
string | $rgbColor | RGB color like "FF08B2" |
- Return values
-
The documentation for this class was generated from the following file:
- lib/spout/src/Spout/Common/Entity/Style/Color.php