color method Null safety

int color(
  1. int index
)

Implementation

int color(int index) {
  final ci = index * 3;
  final a = (index == transparent) ? 0 : 255;
  return getColor(colors[ci], colors[ci + 1], colors[ci + 2], a);
}