// The colors in a rainbow color[] palette = {color(255, 0, 0), color(255, 127, 0), color(255, 255, 0), color(0, 255, 0), color(0, 0, 255), color(111, 0, 255), color(143, 0, 255)}; size(600,400); int numColors = palette.length; // 'length' field automatically defined for arrays float bandWidth = 10; strokeWeight(bandWidth); noFill(); for (int j=0; j < numColors; j++) { float radius = 0.5*width - bandWidth*(1+j); stroke(palette[j]); // pick appropriate color arc(0.5*width, height, 2*radius, 2*radius, PI, TWO_PI); }