1// Avoid the calculation y*height+width
2int index = 0;
3loadPixels();
4for (int y = 0; y < height; y++) {
5  for (int x = 0; x < width; x++) {
6    pixels[index++] = color(102);
7  }
8}
9updatePixels();