I'm new to processing. My question is about random color.I'm having this code in my void draw:
...
void draw() { background(0);
fill(255,0,255); rect(mouseX,390,10,10);
for(int i=0; i<10; i=i+1) { fill(random(255),random(255),random(255)); stroke(0); int ellipseX = 20; int ellipseY = 20; ellipse(ellipseX+i*40, ellipseY,40,40); }
...
the rectangular should track the mouse, that's why i set the background at the beginning to avoid. but i dont want the circles on the top to "bling". the random color should load only once and then the circles should keep this colors. i hope you understand what i mean :)