function socialcalc_cellformat_parsecolor in Sheetnode 6
Same name and namespace in other branches
- 5 socialcalc.inc \socialcalc_cellformat_parsecolor()
- 7.2 socialcalc.inc \socialcalc_cellformat_parsecolor()
- 7 socialcalc.inc \socialcalc_cellformat_parsecolor()
1 call to socialcalc_cellformat_parsecolor()
- _sheetnode_phpexcel_export_sheet in modules/
sheetnode_phpexcel/ sheetnode_phpexcel.export.inc - Helper function to export a single spreadsheet.
File
- ./
socialcalc.inc, line 728 - SocialCalc manipulation functions Translated from socialcalc-3.js and companion files
Code
function socialcalc_cellformat_parsecolor($cell, $sheet, $color) {
if (empty($cell[$color])) {
return FALSE;
}
$parts = array();
preg_match('/^rgb\\((\\d+?),\\s*(\\d+?),\\s*(\\d+?)\\)\\s*$/', $sheet['colors'][$cell[$color]], $parts);
$rgb = array(
'r' => intval($parts[1]),
'g' => intval($parts[2]),
'b' => intval($parts[3]),
);
return $rgb;
}