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