The channel c (0 red … 3 alpha) at x, y.
c
x
y
int at(int x, int y, int c) => rgba[(y * width + x) * 4 + c];