xxxxxxxxxx
function setup() {
createCanvas(400, 400);
rectMode(CENTER);
}
let i = 0;
let c = 255;
let j = 25;
let y = 50
let l = 0
let x = 160
function draw() {
background(220);
noStroke();
while (i <= 410)
{
fill(c, 0, 0);
rect(i, 50, 10, 50);
c -= 6;
i += 10;
}
i = 0;
c = 255;
while (i <= 410)
{
fill(0, c, 0);
rect(i, 200, 10, 50);
c -= 6;
i += 10;
}
i = 0;
c = 255;
while (i <= 410)
{
fill(0, 0, c);
rect(i, 250, 10, 50);
c -= 6;
i += 10;
}
i = 0;
c = 255;
while (i <= 410)
{
fill(c, c, 0);
rect(i, 150, 10, 50);
c -= 6;
i += 10;
}
i = 0;
c = 255;
while (i <= 410)
{
fill(x, 0, c);
rect(i, 300, 10, 50);
c -= 6;
i += 10;
x -= 5
}
i = 0;
c = 255;
x = 150
while (i <= 410)
{
fill(c, x, 0);
rect(i, 100, 10, 50);
c -= 6;
i += 10;
x -= 5
}
i = 0;
c = 255;
x = 150
while (i <= 410)
{
fill(c, 0, c);
rect(i, 350, 10, 50);
c -= 6;
i += 10;
}
i = 0;
c = 255;
while (j <= 400) {
stroke(255);
line(0, j, 400, j);
j += 50
}
j = 25;
while (l <= 400) {
stroke(255);
line(l, 0, l, 400);
l += 10
}
l = 0;
}