ColorPalette.Index (gb.form)

Property Index As Integer

Return or set the index of the current color in the palette, or -1 if no color is selected.