getQuantizedColor method

  1. @override
int getQuantizedColor(
  1. int c
)

Find the color closest to c in the colorMap.

Implementation

@override
int getQuantizedColor(int c) {
  final r = getRed(c);
  final g = getGreen(c);
  final b = getBlue(c);
  final a = getAlpha(c);
  final i = _inxSearch(b, g, r) * 3;
  return getColor(colorMap[i], colorMap[i + 1], colorMap[i + 2], a);
}