code: public final int indexOf(@ColorInt final int color) {
          for (int i = 0; i < colorPalette.length; i++) {
              if (colorPalette[i] == color) {
                  return i;
              }
          }
  
          return -1;
      }
docs: Returns the index of a specific color.
  
  @param color
  The color, whose index should be returned, as an {@link Integer} value
  @return The index of the given color or -1, if the adapter does not contain the color