You are here

private static function PHPExcel_Reader_Gnumeric::_parseGnumericColour in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php \PHPExcel_Reader_Gnumeric::_parseGnumericColour()
2 calls to PHPExcel_Reader_Gnumeric::_parseGnumericColour()
PHPExcel_Reader_Gnumeric::loadIntoExisting in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php
* Loads PHPExcel from file into PHPExcel instance * *
PHPExcel_Reader_Gnumeric::_parseBorderAttributes in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php, line 863

Class

PHPExcel_Reader_Gnumeric
PHPExcel_Reader_Gnumeric

Code

private static function _parseGnumericColour($gnmColour) {
  list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour);
  $gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
  $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
  $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2);
  $RGB = $gnmR . $gnmG . $gnmB;

  //		echo 'Excel Colour: ',$RGB,'<br />';
  return $RGB;
}