Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • PHPExcel_Style
  • PHPExcel_Style_Alignment
  • PHPExcel_Style_Border
  • PHPExcel_Style_Borders
  • PHPExcel_Style_Color
  • PHPExcel_Style_Conditional
  • PHPExcel_Style_Fill
  • PHPExcel_Style_Font
  • PHPExcel_Style_NumberFormat
  • PHPExcel_Style_Protection
  • PHPExcel_Style_Supervisor
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Style_Color

PHPExcel_Style_Color

PHPExcel_Style_Supervisor
Extended by PHPExcel_Style_Color implements PHPExcel_IComparable
Package: PHPExcel\Style
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Style/Color.php
Methods summary
public
# __construct( string $pARGB = PHPExcel_Style_Color::COLOR_BLACK, boolean $isSupervisor = FALSE, boolean $isConditional = FALSE )

Create a new PHPExcel_Style_Color

Create a new PHPExcel_Style_Color

Parameters

$pARGB
ARGB value for the colour
$isSupervisor

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

$isConditional

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

Overrides

PHPExcel_Style_Supervisor::__construct()
public PHPExcel_Style_Color
# bindParent( mixed $parent, string $parentPropertyName = NULL )

Bind parent. Only used for supervisor

Bind parent. Only used for supervisor

Parameters

$parent
$parentPropertyName

Returns

PHPExcel_Style_Color

Overrides

PHPExcel_Style_Supervisor::bindParent()
public PHPExcel_Style_Color
# getSharedComponent( )

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

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

Returns

PHPExcel_Style_Color
public array
# getStyleArray( array $array )

Build style array from subcomponents

Build style array from subcomponents

Parameters

$array

Returns

array
public PHPExcel_Style_Color
# applyFromArray( array $pStyles = NULL )

Apply styles from array

Apply styles from array

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

Parameters

$pStyles
Array containing style information

Returns

PHPExcel_Style_Color

Throws

PHPExcel_Exception
public string
# getARGB( )

Get ARGB

Get ARGB

Returns

string
public PHPExcel_Style_Color
# setARGB( string $pValue = PHPExcel_Style_Color::COLOR_BLACK )

Set ARGB

Set ARGB

Parameters

$pValue

Returns

PHPExcel_Style_Color
public string
# getRGB( )

Get RGB

Get RGB

Returns

string
public PHPExcel_Style_Color
# setRGB( string $pValue = '000000' )

Set RGB

Set RGB

Parameters

$pValue
RGB value

Returns

PHPExcel_Style_Color
private static string
# _getColourComponent( string $RGB, integer $offset, boolean $hex = TRUE )

Get a specified colour component of an RGB value

Get a specified colour component of an RGB value

Parameters

$RGB
The colour as an RGB value (e.g. FF00CCCC or CCDDEE
$offset
Position within the RGB value to extract
$hex

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

Returns

string
The extracted colour component

Private

public static string
# getRed( string $RGB, boolean $hex = TRUE )

Get the red colour component of an RGB value

Get the red colour component of an RGB value

Parameters

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

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

Returns

string
The red colour component
public static string
# getGreen( string $RGB, boolean $hex = TRUE )

Get the green colour component of an RGB value

Get the green colour component of an RGB value

Parameters

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

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

Returns

string
The green colour component
public static string
# getBlue( string $RGB, boolean $hex = TRUE )

Get the blue colour component of an RGB value

Get the blue colour component of an RGB value

Parameters

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

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

Returns

string
The blue colour component
public static string
# changeBrightness( string $hex, float $adjustPercentage )

Adjust the brightness of a color

Adjust the brightness of a color

Parameters

$hex
The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)
$adjustPercentage
The percentage by which to adjust the colour as a float from -1 to 1

Returns

string
The adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE)
public static PHPExcel_Style_Color
# indexedColor( integer $pIndex, boolean $background = FALSE )

Get indexed color

Get indexed color

Parameters

$pIndex
Index entry point into the colour array
$background

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

Returns

PHPExcel_Style_Color
public string
# getHashCode( )

Get hash code

Get hash code

Returns

string
Hash code

Implementation of

PHPExcel_IComparable::getHashCode()
Methods inherited from PHPExcel_Style_Supervisor
__clone(), getActiveCell(), getActiveSheet(), getIsSupervisor(), getSelectedCells()
Constants summary
string COLOR_BLACK
# 'FF000000'
string COLOR_WHITE
# 'FFFFFFFF'
string COLOR_RED
# 'FFFF0000'
string COLOR_DARKRED
# 'FF800000'
string COLOR_BLUE
# 'FF0000FF'
string COLOR_DARKBLUE
# 'FF000080'
string COLOR_GREEN
# 'FF00FF00'
string COLOR_DARKGREEN
# 'FF008000'
string COLOR_YELLOW
# 'FFFFFF00'
string COLOR_DARKYELLOW
# 'FF808000'
Properties summary
protected static array $_indexedColors

Indexed colors array

Indexed colors array

#
protected string $_argb

ARGB - Alpha RGB

ARGB - Alpha RGB

# NULL
protected string $_parentPropertyName

Parent property name

Parent property name

#
Properties inherited from PHPExcel_Style_Supervisor
$_isSupervisor, $_parent
Autene API documentation generated by ApiGen