We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, what I want to do is having a color (let's say red) and automatically generate other colors which are different shades of red.. I have no idea where to start..do you know examples or particular algorithms that I should look at?
Basically I have this code..the position of the circle changes (x axis) randomly but is still floating around the center..I would like to apply this concept to colors..
float xloc = (float)randomGaussian();
int mean = width/2;
int ds = 60;
float x = ds * xloc + mean;
fill(0,10);
noStroke();
ellipse(x, height/2,15,15);
thanks
Answers
See if this works for you
By changing the range of
random(-20,20);
you can control how close the resulting shade will be to the original colorHi, thank you..actually I mixed my example with your code and using the randomGaussian seems to do the trick..what do you think about this solution?
It seems to work fine!