random pick color

Moderators: Disciple, zlovatt

Post Reply
kunyi
Posts: 2
Joined: February 11th, 2007, 8:04 pm

It might be simple, but how can I make an expression to random pick the color in the color attribute,? I've try put the rgb color number but it didnt work.any way to identify the color?
thank so much
Kuni
pdeb
Posts: 21
Joined: November 7th, 2006, 2:07 pm

kunyi,

This gives you a random colour that doesn't change over the duration of the comp (I usually apply this to the Tint effect):

seedRandom(index, true);
R=random(0, 1);
G=random(0, 1);
B=random(0,1);
[R,G,B,1] //where 1 is alpha, I believe

You can also attach expression sliders for min and max R, G, and B and substitute these for (0,1) if you want to animate the colour or bias the random colours towards a particular hue.

HTH,
pdeb
kunyi
Posts: 2
Joined: February 11th, 2007, 8:04 pm

Thanks a lot, it's simple than I thought!
Post Reply