What are the 56 ColorIndex colors in Excel


Excels 56 ColorIndex Colors

 

Color Palette

Excel’s Color Palette has an index of 56 colors which can be used throughout your spreadsheet. Each of these colors in the palette is associated with a unique value in the ColorIndex. For reasons unknown, aside from the index value, Excel also recognizes the names for Colors 1 through 8 (Black, White, Red, Green, Blue, Yellow, Magenta, and Cyan).
 

interior ColorIndex HTML bgcolor= Red Green Blue Color
Black [Color 1] #000000 #000000 0 0 0 [Black]
White [Color 2] #FFFFFF #FFFFFF 255 255 255 [White]
Red [Color 3] #FF0000 #FF0000 255 0 0 [Red]
Green [Color 4] #00FF00 #00FF00 0 255 0 [Green]
Blue [Color 5] #0000FF #0000FF 0 0 255 [Blue]
Yellow [Color 6] #FFFF00 #FFFF00 255 255 0 [Yellow]
Magenta [Color 7] #FF00FF #FF00FF 255 0 255 [Magenta]
Cyan [Color 8] #00FFFF #00FFFF 0 255 255 [Cyan]
[Color 9] [Color 9] #800000 #800000 128 0 0 [Color 9]
[Color 10] [Color 10] #008000 #008000 0 128 0 [Color 10]
[Color 11] [Color 11] #000080 #000080 0 0 128 [Color 11]
[Color 12] [Color 12] #808000 #808000 128 128 0 [Color 12]
[Color 13] [Color 13] #800080 #800080 128 0 128 [Color 13]
[Color 14] [Color 14] #008080 #008080 0 128 128 [Color 14]
[Color 15] [Color 15] #C0C0C0 #C0C0C0 192 192 192 [Color 15]
[Color 16] [Color 16] #808080 #808080 128 128 128 [Color 16]
[Color 17] [Color 17] #9999FF #9999FF 153 153 255 [Color 17]
[Color 18] [Color 18] #993366 #993366 153 51 102 [Color 18]
[Color 19] [Color 19] #FFFFCC #FFFFCC 255 255 204 [Color 19]
[Color 20] [Color 20] #CCFFFF #CCFFFF 204 255 255 [Color 20]
[Color 21] [Color 21] #660066 #660066 102 0 102 [Color 21]
[Color 22] [Color 22] #FF8080 #FF8080 255 128 128 [Color 22]
[Color 23] [Color 23] #0066CC #0066CC 0 102 204 [Color 23]
[Color 24] [Color 24] #CCCCFF #CCCCFF 204 204 255 [Color 24]
[Color 25] [Color 25] #000080 #000080 0 0 128 [Color 25]
[Color 26] [Color 26] #FF00FF #FF00FF 255 0 255 [Color 26]
[Color 27] [Color 27] #FFFF00 #FFFF00 255 255 0 [Color 27]
[Color 28] [Color 28] #00FFFF #00FFFF 0 255 255 [Color 28]
[Color 29] [Color 29] #800080 #800080 128 0 128 [Color 29]
[Color 30] [Color 30] #800000 #800000 128 0 0 [Color 30]
[Color 31] [Color 31] #008080 #008080 0 128 128 [Color 31]
[Color 32] [Color 32] #0000FF #0000FF 0 0 255 [Color 32]
[Color 33] [Color 33] #00CCFF #00CCFF 0 204 255 [Color 33]
[Color 34] [Color 34] #CCFFFF #CCFFFF 204 255 255 [Color 34]
[Color 35] [Color 35] #CCFFCC #CCFFCC 204 255 204 [Color 35]
[Color 36] [Color 36] #FFFF99 #FFFF99 255 255 153 [Color 36]
[Color 37] [Color 37] #99CCFF #99CCFF 153 204 255 [Color 37]
[Color 38] [Color 38] #FF99CC #FF99CC 255 153 204 [Color 38]
[Color 39] [Color 39] #CC99FF #CC99FF 204 153 255 [Color 39]
[Color 40] [Color 40] #FFCC99 #FFCC99 255 204 153 [Color 40]
[Color 41] [Color 41] #3366FF #3366FF 51 102 255 [Color 41]
[Color 42] [Color 42] #33CCCC #33CCCC 51 204 204 [Color 42]
[Color 43] [Color 43] #99CC00 #99CC00 153 204 0 [Color 43]
[Color 44] [Color 44] #FFCC00 #FFCC00 255 204 0 [Color 44]
[Color 45] [Color 45] #FF9900 #FF9900 255 153 0 [Color 45]
[Color 46] [Color 46] #FF6600 #FF6600 255 102 0 [Color 46]
[Color 47] [Color 47] #666699 #666699 102 102 153 [Color 47]
[Color 48] [Color 48] #969696 #969696 150 150 150 [Color 48]
[Color 49] [Color 49] #003366 #003366 0 51 102 [Color 49]
[Color 50] [Color 50] #339966 #339966 51 153 102 [Color 50]
[Color 51] [Color 51] #003300 #003300 0 51 0 [Color 51]
[Color 52] [Color 52] #333300 #333300 51 51 0 [Color 52]
[Color 53] [Color 53] #993300 #993300 153 51 0 [Color 53]
[Color 54] [Color 54] #993366 #993366 153 51 102 [Color 54]
[Color 55] [Color 55] #333399 #333399 51 51 153 [Color 55]
[Color 56] [Color 56] #333333 #333333 51 51 51 [Color 56]

The values in the above table were generated with help from the following macro.

Sub colors56()
  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
done:
  Application.Calculation = xlCalculationAutomatic
  Application.ScreenUpdating = True
End Sub

Hex equivalents used in HTML

 #000000        #993300        #333300        #003300        #003366        #000080        #333399        #333333      
 #800000        #FF6600        #808000        #008000        #008080        #0000FF        #666699        #808080      
 #FF0000        #FF9900        #99CC00        #339966        #33CCCC        #3366FF        #800080        #969696      
 #FF00FF        #FFCC00        #FFFF00        #00FF00        #00FFFF        #00CCFF        #993366        #C0C0C0      
 #FF99CC        #FFCC99        #FFFF99        #CCFFCC        #CCFFFF        #99CCFF        #CC99FF        #FFFFFF      
  Additional 16 colors below are not shown on the 40 color toolbar palette but can be seen under Format, Cells, Pattern
 #9999FF        #993366        #FFFFCC        #CCFFFF        #660066        #FF8080        #0066CC        #CCCCFF      
 #000080        #FF00FF        #FFFF00        #00FFFF        #800080        #800000        #008080        #0000FF