-
Making an array of color values
So I have a “fill” effect, and I want an expression to randomly select a color from a palette of 3 colors. Is is possible to declare an array of 3 RGB values, and then have the layer pick a random number between 0 and 2, and use the corresponding value from the array?
This is ALMOST working, can’t figure out why it won’t recognize the first color properly, this is applied to the “color” property-
options = [[120, 120, 120], [0, 255, 0], [0, 0, 255]];
//seedRandom(index, true);
r = Math.round(random(2));
v = options[r];
[v[0], v[1], v[2], 255]