public final int indexOf ( @ ColorInt final int color ) { for ( int i = 0 ; i < colorPalette . length ; i ++ ) { if ( colorPalette [ i ] == color ) { return i ; } } return - 1 ; }
Returns the index of a specific color .