Question
How to loop an expression in After Effects?
I've got a simple expression to ease between two colors on a rectangle. How can I get this expression to loop repeatedly? I know that to use the loop() function, I need to have keyframes set, but I want to make multiple copies of this layer that all have random offsets and colors. Is there maybe a better way to accomplish this? I've attached my code below.
var colors = ["E6E8BF", "DDDA00", "F27900", "DD1D00"];
var rgbColor1 = hexToRgb(colors[effect("Color 1")("Slider").value]);
var rgbColor2 = hexToRgb(colors[effect("Color 2")("Slider").value]);
ease(time, 3, 4, rgbColor1, rgbColor2);
