void setup() { size(893, 50); } void draw() { background(204); noStroke(); float r = mouseX; for (int y = 0 ; y < 50; y += 10) { for (int x = 0 ; x < 893; x += 10) { fill((x+y) * map(r, 0, 893, 0, 3)); rect(x, y, 10, 10); } } }