RosettaCodeData/Task/Colour-bars-Display/Processing/colour-bars-display.processing

16 lines
325 B
Plaintext

fullScreen();
noStroke();
color[] cs = {
color(0), // black
color(255,0,0), // red
color(0,255,0), // green
color(255,0,255), // magenta
color(0,255,255), // cyan
color(255,255,0), // yellow
color(255) // white
};
for(int i=0; i<7; i++) {
fill(cs[i]);
rect(i*width/8,0,width/8,height);
}