Whether this is your issue or not I don't know, as I'm not set up to test it. After a quick glance at some documentation, set_custom_color() takes the following arguments:
$workbook->set_custom_color(40, 255, 102, 0 ); # Orange $workbook->set_custom_color(40, 0xFF, 0x66, 0x00); # Same thing $workbook->set_custom_color(40, '#FF6600' ); # Same thing
So it looks like you either need to break up the $sRGB variable into separate hex values, or simply quote the whole thing and prepend it with a #:
$workbook->set_custom_color($back_color, "#$sRGB");
In reply to Re: How to convert RGB decimal to RGB hex and vise versa in Excel sheets?
by stevieb
in thread How to convert RGB decimal to RGB hex and vise versa in Excel sheets?
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |