getForeground method
Packed RGBA foreground at cell (x, y).
Out-of-range coordinates throw from the shared cell-index check.
Implementation
Color getForeground(int x, int y) {
final index = _getIndex(x, y);
return _readRgba(_foregrounds, index);
}