For palette colors, returns the 0-based index of the color in the spreadsheet's color palette. For custom colors, this property will return a negative number. Automatic colors will return an index greater than or equal to 56 (the maximum index in the palette).

public int PaletteIndex{ get; }
Public ReadOnly Property PaletteIndex() As Integer
int colorIndex = clr.PaletteIndex;
Dim colorIndex As Integer = clr.PaletteIndex