getIndex static method

int getIndex(
  1. int r,
  2. int g,
  3. int b
)

Implementation

static int getIndex(int r, int g, int b) {
  return (r << (indexBits * 2)) +
      (r << (indexBits + 1)) +
      (g << indexBits) +
      r +
      g +
      b;
}