float radius; color c1,c2,c3; float chance; size(300,300); c1=color(0,0,50, 128); c2=color(100,0,200); c3=color(100,200,255, 200); background(255); noStroke(); for(int i=0; i<150; i++) { chance=random(100); if(chance<60) fill(c1); else if(chance<90) fill(c2); else fill(c3); // fill(0,0,random(255)); // 310 % 200 == 110 // 50 % 45 == 5 // 50 % 100 == 50 // 50 % 50 == 0 // fill(i%255); // i modulus 255 radius=random(10)+20; rect(random(width),random(height), radius,radius); }