0

I'm trying to write a script to automatically generate an excel sheet. To keep the coloring of cells/rows consistent, I want to get the html color code from Excel to use in my script.

I found this link online which seems to give me what I need but I can't find a corresponding function in Excel 2011. Can someone tell me how to get the hex/html color code for cells from Excel 2011?

2 Answers 2

2

Digital Color Meter

In '/Applications/Utilities/` there is an app 'Digital Color Meter'. You can use this to find the color codes (HEX, RGB, etc)

2
  • 1
    Do I understand your question correctly? Commented Sep 10, 2015 at 12:41
  • wow, this is a cool tool! thx
    – Classified
    Commented Sep 10, 2015 at 17:58
1

Visual Basic

Visual Basic provides a number of methods for accessing the color of a cell: you can then convert to hex from RGB. However, you said you can't find functions in your version of Excel, so I won't delve into that.

JavaScript

Although it's not as farm along as the Visual Basic libraries, depending on what you know, this may be easier. Support and answers are harder to find, but feel free to take a look. https://msdn.microsoft.com/EN-US/library/office/mt616485.aspx

Colorpickers

Digital Color Meter in /Applications/Utilities is great, and is included by default. Any other color picker will work as well: Pixie is included in Xcode if you download the optional graphics package. This obviously isn't scriptable in the same sense, so I'm not sure if this is what you're looking for.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .