-
Expression for color control (not random)
Hey everyone. I got an expression for color control which is working great, the only issue with it is that is random, I’d like the expression to choose the colors from the colors list but not randomly.
This is the expression I got:
colors = [[225, 255, 0,255]/255,
[0, 246, 255,255]/255,
[0, 17, 255,255]/255,
[255, 0, 152,255]/255,
[152, 0, 255,255]/255,
[0, 255, 85,255]/255,
[255, 195, 0,255]/255];
easeTime = .5;
segDur = 5;curSeg = Math.floor(time/segDur);
t = time%segDur;
seedRandom(curSeg,true);
idx1 = Math.floor(random(colors.length));
seedRandom(curSeg-1,true);
idx0 = Math.floor(random(colors.length));
ease(t,0,easeTime,colors[idx0],colors[idx1])