num get(int ci) => palette != null ? palette!.get(data[_index], ci) : ci < numChannels ? data[_index + ci] : 0;