getColorIndex method

  1. @override
int getColorIndex(
  1. Color c
)

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

Implementation

@override
int getColorIndex(Color c) {
  final r = c.r.toInt();
  final g = c.g.toInt();
  final b = c.b.toInt();
  return _inxSearch(b, g, r);
}