Scroll through several colors
in
Programming Questions
•
1 year ago
i am trying to get a code that will let the line scroll through and change the color. i would like to get it to filter through several colors and so far I have a basic code picked out, I can get it to draw in a new color but is there a way to tell it that since it's now teal, it has to draw red, etc.
float a = 100;
void setup()
{
size(500, 500);
background(255);
}
void draw()
{
stroke(95, 158, 160);
a = a - 0.5;
if (a < 0) {
a = height;
}
line(0, a, width, a);
}
float a = 100;
void setup()
{
size(500, 500);
background(255);
}
void draw()
{
stroke(95, 158, 160);
a = a - 0.5;
if (a < 0) {
a = height;
}
line(0, a, width, a);
}
1