protected function PHPExcel_Helper_HTML::rgbToColour in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Helper/HTML.php \PHPExcel_Helper_HTML::rgbToColour()
1 call to PHPExcel_Helper_HTML::rgbToColour()
- PHPExcel_Helper_HTML::startFontTag in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Helper/ HTML.php
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Helper/ HTML.php, line 638
Class
Code
protected function rgbToColour($rgb) {
preg_match_all('/\\d+/', $rgb, $values);
foreach ($values[0] as &$value) {
$value = str_pad(dechex($value), 2, '0', STR_PAD_LEFT);
}
return implode($values[0]);
}