PHPExcel_Style_Color

category PHPExcel
package PHPExcel_Style
copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

 Methods

Implement PHP __clone to create a deep clone, not just a shallow copy.

__clone() 
Inherited
inherited_from \PHPExcel_Style_Supervisor::__clone()

Create a new PHPExcel_Style_Color

__construct(string $pARGB, boolean $isSupervisor, boolean $isConditional) 

Parameters

$pARGB

string

ARGB value for the colour

$isSupervisor

boolean

Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are

$isConditional

boolean

Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are

Apply styles from array

applyFromArray(array $pStyles) : \PHPExcel_Style_Color
$objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray( array('rgb' => '808080') );

Parameters

$pStyles

array

Array containing style information

Exceptions

\PHPExcel_Exception

Returns

Bind parent.

bindParent(mixed $parent, string $parentPropertyName) : \PHPExcel_Style_Color

Only used for supervisor

Parameters

$parent

mixed

$parentPropertyName

string

Returns

Adjust the brightness of a color

changeBrightness(string $hex, float $adjustPercentage) : string
Static

Parameters

$hex

string

The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)

$adjustPercentage

float

The percentage by which to adjust the colour as a float from -1 to 1

Returns

stringThe adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)

Get ARGB

getARGB() : string

Returns

string

Get the currently active cell coordinate in currently active sheet.

getActiveCell() : string
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::getActiveCell()

Returns

stringE.g. 'A1'

Get the currently active sheet.

getActiveSheet() : \PHPExcel_Worksheet
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::getActiveSheet()

Returns

Get the blue colour component of an RGB value

getBlue(string $RGB, boolean $hex) : string
Static

Parameters

$RGB

string

The colour as an RGB value (e.g. FF00CCCC or CCDDEE

$hex

boolean

Flag indicating whether the component should be returned as a hex or a decimal value

Returns

stringThe blue colour component

Get the green colour component of an RGB value

getGreen(string $RGB, boolean $hex) : string
Static

Parameters

$RGB

string

The colour as an RGB value (e.g. FF00CCCC or CCDDEE

$hex

boolean

Flag indicating whether the component should be returned as a hex or a decimal value

Returns

stringThe green colour component

Get hash code

getHashCode() : string

Returns

stringHash code

Is this a supervisor or a cell style component?

getIsSupervisor() : boolean
Inherited
inherited_from \PHPExcel_Style_Supervisor::getIsSupervisor()

Returns

boolean

Get RGB

getRGB() : string

Returns

string

Get the red colour component of an RGB value

getRed(string $RGB, boolean $hex) : string
Static

Parameters

$RGB

string

The colour as an RGB value (e.g. FF00CCCC or CCDDEE

$hex

boolean

Flag indicating whether the component should be returned as a hex or a decimal value

Returns

stringThe red colour component

Get the currently active cell coordinate in currently active sheet.

getSelectedCells() : string
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::getSelectedCells()

Returns

stringE.g. 'A1'

Get the shared style component for the currently active cell in currently active sheet.

getSharedComponent() : \PHPExcel_Style_Color

Only used for style supervisor

Returns

Build style array from subcomponents

getStyleArray(array $array) : array

Parameters

$array

array

Returns

array

Get indexed color

indexedColor(int $pIndex, boolean $background) : \PHPExcel_Style_Color
Static

Parameters

$pIndex

int

Index entry point into the colour array

$background

boolean

Flag to indicate whether default background or foreground colour should be returned if the indexed colour doesn't exist

Returns

Set ARGB

setARGB(string $pValue) : \PHPExcel_Style_Color

Parameters

$pValue

string

Returns

Set RGB

setRGB(string $pValue) : \PHPExcel_Style_Color

Parameters

$pValue

string

RGB value

Returns

Get a specified colour component of an RGB value

_getColourComponent(string $RGB, int $offset, boolean $hex) : string
Static
private

Parameters

$RGB

string

The colour as an RGB value (e.g. FF00CCCC or CCDDEE

$offset

int

Position within the RGB value to extract

$hex

boolean

Flag indicating whether the component should be returned as a hex or a decimal value

Returns

stringThe extracted colour component

 Properties

 

$_argb : string
 

$_indexedColors : array
 

$_isSupervisor : boolean
Inherited
inherited_from \PHPExcel_Style_Supervisor::$$_isSupervisor
 

$_parent : \PHPExcel_Style
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::$$_parent
 

$_parentPropertyName : string

 Constants

 

COLOR_BLACK

COLOR_BLACK 
 

COLOR_BLUE

COLOR_BLUE 
 

COLOR_DARKBLUE

COLOR_DARKBLUE 
 

COLOR_DARKGREEN

COLOR_DARKGREEN 
 

COLOR_DARKRED

COLOR_DARKRED 
 

COLOR_DARKYELLOW

COLOR_DARKYELLOW 
 

COLOR_GREEN

COLOR_GREEN 
 

COLOR_RED

COLOR_RED 
 

COLOR_WHITE

COLOR_WHITE 
 

COLOR_YELLOW

COLOR_YELLOW