void setup() {
size(200, 100);
noSmooth();
}
void draw() {
for(int y = 0; y < height; y++){
for(int x = 0; x < width; x++){
float r = random(256);
float g = random(256);
float b = random(256);
stroke(r, g, b);
point(x, y);
}
}
}
This code uses a nested for loop to loop over every pixel in the window. For each pixel, it creates a random color and draws a point with that color at that pixel.

See the Pen by Happy Coding (@KevinWorkman) on CodePen.
noise() function to come up with a shade of gray for each pixel. Read more about Perlin noise for more info.