Regardless of wether you use the aColor
variable or not, you must be using fill()
somewhere from your draw()
loop.
By default fill() works globally: all subsequent shapes that will be drawn after a fill() call will have that colour.
To isolate fill() calls so they affect shapes drawn locally, not globally, you need to isolate such fill() calls within pushStyle()/popStyle() calls.
fill(192,0,0);//set global fill to red
rect(0,0,50,50);
pushStyle();
fill(0,192,0);//set local fill to green
rect(50,0,50,50);
popStyle();
rect(50,50,50,50);//draw using last global fill: red