We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi to all. I would like to create some color cycling (from a color to another), leaving meanwhile a gradient look. Could I get some direction on ways to achieve this?
It's probably easiest if you use HSB colourmode. Loop over each pixel, give it a hue value and shift it in the next iteration.
int x;color c,k;void setup(){size(220,220);r();background(0);} void draw(){if(x>width)r();stroke(lerpColor(c,k,map(x,0,width,0,1)));line(x,0,x++,height);} void r(){c=n();k=n();x=0;}color n(){return(color(random(255),random(255),random(255)));}
bourdonprince, remember to choose a category when you post a message. Thanks.
And remember there is a search function on the Processing site: https://www.google.fr/search?as_sitesearch=processing.org&as_q=color+gradient
Answers
It's probably easiest if you use HSB colourmode. Loop over each pixel, give it a hue value and shift it in the next iteration.
bourdonprince, remember to choose a category when you post a message. Thanks.
And remember there is a search function on the Processing site: https://www.google.fr/search?as_sitesearch=processing.org&as_q=color+gradient