Replace:-
red ++;
With:-
red += random(20);
Similarly
// green ++;
green += random(25);
...........
//blue ++;
blue += random(30);
Finally add this line in the setup function
randomSeed(analogRead(0));
Replace:-
red ++;
With:-
red += random(20);
Similarly
// green ++;
green += random(25);
...........
//blue ++;
blue += random(30);
Finally add this line in the setup function
randomSeed(analogRead(0));