void setup() { size(400, 400); background(255); } void draw () { int b = int(random(255)); stroke(rc(b), random(255)); drawRectangle(random(width), random(height), random(200), random(200)); } void drawRectangle (float x, float y, float w, float h) { strokeWeight(random(0, 2)); int b = int(random(255)); fill(rc(b), random(255)); rect(x, y, w, h); } // Generate a color somewhat near parallel to // the gray line in the color cube (what's that called?) color rc (int k) { int[] rgb = new int[3]; for (int i=0; i<3; i++) { float rand = random(2); int bool = 1; if (rand > 1) { bool = -1; } rgb[i] = k + (bool * int(random(50))); } return color(rgb[0], rgb[1], rgb[2]); }