-
Random Color
Hello,
I would like a shape layer to randomly alternate between 4 specific colors. My if/else statement appears to be working (when I manually assign a value between 1-3 to the variable c, the color of my shape changes).
When I use
“seed = Math.floor(time);
seedRandom(seed,true);
c=random(1,3);”
c appears to take a value beyond 1-3 and hold that value across time.I suspect I’m making some simple error, but my syntax looks correct! Any help is greatly appreciated.
-Matt
seed = Math.floor(time);
seedRandom(seed,true);//c=1;
c=random(1,3);
if (c==1) {[3,130,171,255]/255;}
else if (c==2) {[128,207,217,255]/255;}
else if (c==3) {[2,146,113,255]/255;}
else {[255,102,0,255]/255;}