getChannel function
Get the channel
from the color
.
Implementation
int getChannel(int color, Channel channel) => channel == Channel.red
? getRed(color)
: channel == Channel.green
? getGreen(color)
: channel == Channel.blue
? getBlue(color)
: channel == Channel.alpha
? getAlpha(color)
: getLuminance(color);