So if I wanted to set the colours to be random between certain parameters, for example, keep it brighter than, say, 150, but not brighter than 220. How would I write that?
color from = color(204, 102, 0);
color to = color(0, 102, 153);
void setup() {
frameRate(1);
}
void draw() {
// random background in color range
color randc = lerpColor(from, to, random(1));
background (randc);
// draw color bar
for(int i=0; i<10; i++){
fill(lerpColor(from, to, i/10.0));
rect(0,0,10,10);
translate(10,0);
}
}