Sets foreground color at coordinates.
void setForeground(int x, int y, int fg) { if (x >= 0 && x < width && y >= 0 && y < height) { attributes[(y * width + x) * 3 + 0] = fg; } }