lookup method

int lookup(
  1. int c
)

Find the index of the closest color to c in the colorMap.

Implementation

int lookup(int c) {
  final r = getRed(c);
  final g = getGreen(c);
  final b = getBlue(c);
  return _inxSearch(b, g, r);
}