Activity › Forums › Adobe After Effects Expressions › How to randomly change color of characters
-
Dan Ebberts
March 30, 2018 at 7:51 pmTry it this way:
x=effect(“Color Control”)(“Color”);
y=effect(“Color Control 2”)(“Color”);
palette = [[x[0],x[1],x[2]]*100, [y[0],y[1],y[2]]*100];
idx = (textIndex-1)%palette.length;
palette[idx]Dan
-
Marissa Joyner
March 30, 2018 at 8:59 pmgosh darnit I knew it was something small, lol!
Thank you Dan!!!!!
After Effects template maniac
https://www.fluxvfx.com/ -
Lewis Lloyd
May 12, 2019 at 10:38 pmHi Dan,
I read through your informative answers on this thread, and I managed to get the first script you posted working – but the following ones didn’t work for me unfortunately. I actually just want individual characters in my text to switch between black and white – like in the file attached. Is there an easy way to do this with a script? I sadly couldn’t get the one with a colour palette to work. Any help much appreciated.
Thanks!
Lewis
-
Dan Ebberts
May 12, 2019 at 11:38 pm>I sadly couldn’t get the one with a colour palette to work.
This works for me (black text, white fill animator):
dur = .25; // length of time to hold each color
seedRandom(textIndex,true);
seg = Math.floor((time+random(999))/dur);
seedRandom(seg,true);
palette = [[100,100,100],[0,0,0]];
// [white,black]
idx = Math.floor(random(palette.length));
palette[idx]Dan
-
Karin Jager
June 11, 2019 at 2:04 pmHi,
As other users before, I’m stuck with an expression that I can not write properly.
I’m using AE CS6.
I need to randomly animate the colors of individal characters in words, from white to colors.I need characters to color gradually from left to right, one after the other. For that, I animated the end property with two keys, from 0% to 21% (because there is 21 characters, spaces included).
Text is white, fill color is black. I copy the code I found on Dan’s former posts, it creates random colors from the first key at 2 sec, but not gradually. Here is my screenshot, sorry that this is in French, I hope you ‘ll understand my request, I am not a specialist. I’ve been trying a lot of things that does not work !
Thanks in advance for your help, I’m getting mad with it ????
Karin -
Kalleheikki Kannisto
June 12, 2019 at 6:14 amWhich expression are you using? There are six variations in this thread.
Kalleheikki Kannisto
Senior Graphic Designer -
Karin Jager
June 12, 2019 at 11:47 am -
Kalleheikki Kannisto
June 13, 2019 at 7:35 am -
Karin Jager
June 13, 2019 at 4:08 pmMany many thanks Kalleheikki Kannisto, It seems so easy when you know how to do it ???? Is there any chance that I could get your file 13421_colorletters.aep in a downgrade version ? (I use CS6) I would really like to see it.
Thanks again !
Reply to this Discussion! Login or Sign Up


