Color
in package
implements
ComparableInterface
\PhpOffice\PhpPresentation\Style\Color.
Table of Contents
Interfaces
- ComparableInterface
- PhpOffice\PhpPresentation\ComparableInterface.
Constants
- COLOR_BLACK = 'FF000000'
- COLOR_BLUE = 'FF0000FF'
- COLOR_DARKBLUE = 'FF000080'
- COLOR_DARKGREEN = 'FF008000'
- COLOR_DARKRED = 'FF800000'
- COLOR_DARKYELLOW = 'FF808000'
- COLOR_GREEN = 'FF00FF00'
- COLOR_RED = 'FFFF0000'
- COLOR_WHITE = 'FFFFFFFF'
- COLOR_YELLOW = 'FFFFFF00'
Properties
- $argb : string
- ARGB - Alpha RGB.
- $hashIndex : int
- Hash index.
Methods
- __construct() : mixed
- Create a new \PhpOffice\PhpPresentation\Style\Color.
- getAlpha() : int
- Get the alpha % of the ARGB Will return 100 if no ARGB.
- getARGB() : string
- Get ARGB.
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getRGB() : string
- Get RGB.
- setAlpha() : $this
- Set the alpha % of the ARGB.
- setARGB() : Color
- Set ARGB.
- setHashIndex() : $this
- Set hash index.
- setRGB() : Color
- Set RGB.
Constants
COLOR_BLACK
public
mixed
COLOR_BLACK
= 'FF000000'
COLOR_BLUE
public
mixed
COLOR_BLUE
= 'FF0000FF'
COLOR_DARKBLUE
public
mixed
COLOR_DARKBLUE
= 'FF000080'
COLOR_DARKGREEN
public
mixed
COLOR_DARKGREEN
= 'FF008000'
COLOR_DARKRED
public
mixed
COLOR_DARKRED
= 'FF800000'
COLOR_DARKYELLOW
public
mixed
COLOR_DARKYELLOW
= 'FF808000'
COLOR_GREEN
public
mixed
COLOR_GREEN
= 'FF00FF00'
COLOR_RED
public
mixed
COLOR_RED
= 'FFFF0000'
COLOR_WHITE
public
mixed
COLOR_WHITE
= 'FFFFFFFF'
COLOR_YELLOW
public
mixed
COLOR_YELLOW
= 'FFFFFF00'
Properties
$argb
ARGB - Alpha RGB.
private
string
$argb
$hashIndex
Hash index.
private
int
$hashIndex
Methods
__construct()
Create a new \PhpOffice\PhpPresentation\Style\Color.
public
__construct([string $pARGB = self::COLOR_BLACK ]) : mixed
Parameters
- $pARGB : string = self::COLOR_BLACK
getAlpha()
Get the alpha % of the ARGB Will return 100 if no ARGB.
public
getAlpha() : int
Return values
intgetARGB()
Get ARGB.
public
getARGB() : string
Return values
stringgetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getHashIndex()
Get hash index.
public
getHashIndex() : null|int
Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
Return values
null|int —Hash index
getRGB()
Get RGB.
public
getRGB() : string
Return values
stringsetAlpha()
Set the alpha % of the ARGB.
public
setAlpha([int $alpha = 100 ]) : $this
Parameters
- $alpha : int = 100
Return values
$thissetARGB()
Set ARGB.
public
setARGB([string $pValue = self::COLOR_BLACK ]) : Color
Parameters
- $pValue : string = self::COLOR_BLACK
Return values
ColorsetHashIndex()
Set hash index.
public
setHashIndex(int $value) : $this
Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
Parameters
- $value : int
-
Hash index
Return values
$thissetRGB()
Set RGB.
public
setRGB([string $pValue = '000000' ][, string $pAlpha = 'FF' ]) : Color
Parameters
- $pValue : string = '000000'
- $pAlpha : string = 'FF'