LaCaraDeOtro

Motion Designer

Place Berkeley, United States

Level Intermediate

Joined on 20 June 2011

1 Comments

LaCaraDeOtro commented on Generate random shapes on a single shape layer using expressions

@Pixedo

You probably figured this out by now but in case somebody wants to define their own colors for the shapes, try this:

color0 = [255,0,0,255]/255; // red
color1 = [0,255,0,255]/255; // green
color2 = [0,0,255,255]/255; // blue
color3 = [255,255,0,255]/255; // yellow

colors = [color0,color1,color2,color3];
seedRandom(index,true);
colors[Math.floor(random(colors.length))];