You are here

private static function PHPExcel_Style_Color::_getColourComponent in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php \PHPExcel_Style_Color::_getColourComponent()

* Get a specified colour component of an RGB value * * @private *

Parameters

string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE: * @param int $offset Position within the RGB value to extract * @param boolean $hex Flag indicating whether the component should be returned as a hex or a * decimal value * @return string The extracted colour component

3 calls to PHPExcel_Style_Color::_getColourComponent()
PHPExcel_Style_Color::getBlue in vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php
* Get the blue colour component of an RGB value * *
PHPExcel_Style_Color::getGreen in vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php
* Get the green colour component of an RGB value * *
PHPExcel_Style_Color::getRed in vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php
* Get the red colour component of an RGB value * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php, line 250

Class

PHPExcel_Style_Color
PHPExcel_Style_Color

Code

private static function _getColourComponent($RGB, $offset, $hex = TRUE) {
  $colour = substr($RGB, $offset, 2);
  if (!$hex) {
    $colour = hexdec($colour);
  }
  return $colour;
}