Re: [Spreadsheet::ParseExcel] Spreadsheet::ParseExcel::Font - Any recommendations for converting color to hex or rgb?

64 views
Skip to first unread message

John McNamara

unread,
Feb 13, 2013, 7:15:57 PM2/13/13
to spreadsheet...@googlegroups.com


On 13 February 2013 15:22, Lady Aleena <fan...@xecu.net> wrote:
I am looking at the font colors of various cells and can not make out what the number means without going back to the spreadsheet and looking.

'Color' => 10,    # appears to be rgb 153,0,0 or hex 990000
'Color' => 32767, # appears to be rgb 0,0,0   or hex 000000
'Color' => 49,    # appears to be rgb 0,0,153 or hex 000099

Can you recommend a color converter where I can get either the hex (preferred) or rgb value?


Hi,

Apologies, I don't have to generate an example, but there is an undocumented function (not method) in ParseExcel called ColorIdxToRGB() that converts the color index to an RGB code.

The 32767 value looks wrong though since the Excel xls format is limited to 53 colors. It is probably -1 as an unsigned value and thus may mean no color or the default color.

John.

Reply all
Reply to author
Forward
0 new messages