getAlpha method
Get the alpha channel of the palette entry at index. If the palette has
fewer colors or channels, 0 will be returned.
Implementation
@override
num getAlpha(int index) {
  if (numChannels < 4) {
    return 255;
  }
  index *= numChannels;
  if (index >= data.length) {
    return 0;
  }
  return data[index + 3];
}