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.
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
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.