I found this interesting VBA code, which lists out all 56 standard colors used by Excel:
Sub GetColors()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim i As Long
Dim str0 As String, str As String
For i = 0 To 56
Cells(i + 1, 1).Interior.ColorIndex = i
Cells(i + 1, 1).Value = "[Color " & i & "]"
Cells(i + 1, 2).Font.ColorIndex = i
Cells(i + 1, 2).Value = "[Color " & i & "]"
str0 = Right("000000" & Hex(Cells(i + 1, 1).Interior.Color), 6)
'Excel shows nibbles in reverse order so make it as RGB
str = Right(str0, 2) & Mid(str0, 3, 2) & Left(str0, 2)
'generating 2 columns in the HTML table
Cells(i + 1, 3) = "#" & str & "#" & str & ""
Cells(i + 1, 4).Formula = "=Hex2dec(""" & Right(str0, 2) & """)"
Cells(i + 1, 5).Formula = "=Hex2dec(""" & Mid(str0, 3, 2) & """)"
Cells(i + 1, 6).Formula = "=Hex2dec(""" & Left(str0, 2) & """)"
Cells(i + 1, 7) = "[Color " & i & ")"
Next i
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
If I run it in the messed up instance of Excel and then again in the new/good instance, I can see how the color mapping has changed.
Color Indices.JPG
I wonder if I can create a macro with the proper color mappings hardcoded in it, and then save that to my Personal.xlsb file, and use that to reset my colors to the correct settings whenever this issue occurs. If that is possible, it would fix the issue of having to close Excel and reopen, and I wouldn't have to rely on a third party to investigate and change their color palette (which they probably won't care to do). Anyone with more knowledge of these things have thoughts on whether that is possible/easy to do?
Bookmarks