PHPExcel_Style

# Class: PHPExcel_Style_Color Source Location: /PHPExcel/Style/Color.php
### Class Overview
PHPExcel_Style_Color #### Author(s): #### Copyright: Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) Implements interfaces: PHPExcel_IComparable | ### Constants COLOR_BLACK COLOR_BLUE COLOR_DARKBLUE COLOR_DARKGREEN COLOR_DARKRED COLOR_DARKYELLOW COLOR_GREEN COLOR_RED COLOR_WHITE COLOR_YELLOW | ### Methods applyFromArray bindParent changeBrightness __construct getActiveCell getActiveSheet getARGB getBlue getGreen getHashCode getIsSupervisor getRed getRGB getSelectedCells getSharedComponent getStyleArray indexedColor setARGB setRGB __clone
### Class Details [line 36] PHPExcel_Style_Color #### Tags:
copyright: | Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
[ Top ] ### Class Methods ### static method changeBrightness [line 368]
`static string changeBrightness( string $hex, float $adjustPercentage)`
Adjust the brightness of a color #### Tags:
return: | The adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)
access: | public
#### Parameters:
string | $hex | The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)
float | $adjustPercentage | The percentage by which to adjust the colour as a float from -1 to 1
[ Top ] ### static method getBlue [line 353]
`static string getBlue( string $RGB, [boolean $hex = TRUE])`
Get the blue colour component of an RGB value #### Tags:
return: | The blue colour component
access: | public
#### Parameters:
string | $RGB | The colour as an RGB value (e.g. FF00CCCC or CCDDEE
boolean | $hex | Flag indicating whether the component should be returned as a hex or a decimal value
[ Top ] ### static method getGreen [line 337]
`static string getGreen( string $RGB, [boolean $hex = TRUE])`
Get the green colour component of an RGB value #### Tags:
return: | The green colour component
access: | public
#### Parameters:
string | $RGB | The colour as an RGB value (e.g. FF00CCCC or CCDDEE
boolean | $hex | Flag indicating whether the component should be returned as a hex or a decimal value
[ Top ] ### static method getRed [line 321]
`static string getRed( string $RGB, [boolean $hex = TRUE])`
Get the red colour component of an RGB value #### Tags:
return: | The red colour component
access: | public
#### Parameters:
string | $RGB | The colour as an RGB value (e.g. FF00CCCC or CCDDEE
boolean | $hex | Flag indicating whether the component should be returned as a hex or a decimal value
[ Top ] ### static method indexedColor [line 406]
`static PHPExcel_Style_Color indexedColor( int $pIndex, [boolean $background = FALSE])`
Get indexed color #### Tags:
access: | public
#### Parameters:
int | $pIndex | Index entry point into the colour array
boolean | $background | Flag to indicate whether default background or foreground colour should be returned if the indexed colour doesn't exist
[ Top ] ### method applyFromArray [line 216]
`PHPExcel_Style_Color applyFromArray( [array $pStyles = NULL])`
Apply styles from array $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray( array('rgb' => '808080') ); #### Tags:
throws: | Exception
access: | public
#### Parameters:
array | $pStyles | Array containing style information
[ Top ] ### method bindParent [line 115]
`PHPExcel_Style_Color bindParent( mixed $parent, string $parentPropertyName)`
Bind parent. Only used for supervisor #### Tags:
access: | public
#### Parameters:
mixed | $parent |
string | $parentPropertyName |
[ Top ] ### constructor __construct [line 97]
`PHPExcel_Style_Color __construct( [string $pARGB = PHPExcel_Style_Color::COLOR_BLACK], [boolean $isSupervisor = false], [boolean $isConditional = false])`
Create a new PHPExcel_Style_Color #### Tags:
access: | public
#### Parameters:
string | $pARGB | ARGB value for the colour
boolean | $isSupervisor | Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are
boolean | $isConditional | Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are
[ Top ] ### method getActiveCell [line 177]
`string getActiveCell( )`
Get the currently active cell coordinate in currently active sheet. Only used for supervisor #### Tags:
return: | E.g. 'A1'
access: | public
[ Top ] ### method getActiveSheet [line 155]
`PHPExcel_Worksheet getActiveSheet( )`
Get the currently active sheet. Only used for supervisor #### Tags:
access: | public
[ Top ] ### method getARGB [line 239]
`string getARGB( )`
Get ARGB #### Tags:
access: | public
[ Top ] ### method getHashCode [line 487]
`string getHashCode( )`
Get hash code #### Tags:
return: | Hash code
access: | public
[ Top ] ### method getIsSupervisor [line 127]
`boolean getIsSupervisor( )`
Is this a supervisor or a real style component? #### Tags:
access: | public
[ Top ] ### method getRGB [line 270]
`string getRGB( )`
Get RGB #### Tags:
access: | public
[ Top ] ### method getSelectedCells [line 166]
`string getSelectedCells( )`
Get the currently active cell coordinate in currently active sheet. Only used for supervisor #### Tags:
return: | E.g. 'A1'
access: | public
[ Top ] ### method getSharedComponent [line 138]
`PHPExcel_Style_Color getSharedComponent( )`
Get the shared style component for the currently active cell in currently active sheet. Only used for style supervisor #### Tags:
access: | public
[ Top ] ### method getStyleArray [line 188]
`array getStyleArray( array $array)`
Build style array from subcomponents #### Tags:
access: | public
#### Parameters:
array | $array |
[ Top ] ### method setARGB [line 252]
`PHPExcel_Style_Color setARGB( [string $pValue = PHPExcel_Style_Color::COLOR_BLACK])`
Set ARGB #### Tags:
access: | public
#### Parameters:
string | $pValue |
[ Top ] ### method setRGB [line 283]
`PHPExcel_Style_Color setRGB( [string $pValue = '000000'])`
Set RGB #### Tags:
access: | public
#### Parameters:
string | $pValue | RGB value
[ Top ] ### method __clone [line 500]
`void __clone( )`
Implement PHP __clone to create a deep clone, not just a shallow copy. #### Tags:
access: | public
[ Top ] ### Class Constants #### COLOR_BLACK = 'FF000000' [line 39] [ Top ] #### COLOR_BLUE = 'FF0000FF' [line 43] [ Top ] #### COLOR_DARKBLUE = 'FF000080' [line 44] [ Top ] #### COLOR_DARKGREEN = 'FF008000' [line 46] [ Top ] #### COLOR_DARKRED = 'FF800000' [line 42] [ Top ] #### COLOR_DARKYELLOW = 'FF808000' [line 48] [ Top ] #### COLOR_GREEN = 'FF00FF00' [line 45] [ Top ] #### COLOR_RED = 'FFFF0000' [line 41] [ Top ] #### COLOR_WHITE = 'FFFFFFFF' [line 40] [ Top ] #### COLOR_YELLOW = 'FFFFFF00' [line 47] [ Top ] Documentation generated on Fri, 12 Oct 2012 00:23:35 +0200 by phpDocumentor 1.4.4