in reply to How to convert RGB decimal to RGB hex and vise versa in Excel sheets?
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");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to convert RGB decimal to RGB hex and vise versa in Excel sheets?
by thanos1983 (Parson) on Apr 21, 2017 at 23:08 UTC |