Activity › Forums › Adobe After Effects Expressions › Random for text Color
-
Random for text Color
Posted by Daniel Goldman on July 3, 2009 at 1:18 pmI was trying to add a random expression to fill RGB for a text. I tried random([0],[1],[2],[3])thinking it would work but I got an error. What did I do wrong. Random () goes between 0 and 1 which is what I need.Do I need to set up variables first?
Thank youDarren Hardaway replied 16 years, 10 months ago 4 Members · 6 Replies -
6 Replies
-
Dan Ebberts
July 3, 2009 at 1:55 pmThis should do it:
random([1,1,1,1])
If you want it to hold the random color rather than change every frame you’d do this:
seedRandom(index,true);
random([1,1,1,1])Dan
-
Jean Pier biasiolo merchan
July 3, 2009 at 10:12 pmDan Ebberts I have used your code and have not had a result of random colors that I had to integrate the code
” seedRandom(index,true);
random([1,1,1,1]) ” color purpleachievement but not change color random mind as time passes
You can combine this tag with an expression of time?
un saludo desde España Sevilla
greetings from Seville Spain -
Dan Ebberts
July 3, 2009 at 10:23 pmHmmmm…. I’d need a better description of how you want the colors to vary with time.
Dan
-
Jean Pier biasiolo merchan
July 3, 2009 at 10:37 pmTry to explain better my language is not English: P
and will write me very badly but I will try to do good 😛
Example: let’s say I create a text with a soft color, but I want to change his mind without stopping random color. I work for what could be done? and give thanks for advance;)Adobe After Effects Animator
-
Dan Ebberts
July 3, 2009 at 10:42 pmI think we may need someone that knows both Spanish and English to jump in here.
Dan
-
Darren Hardaway
July 6, 2009 at 5:41 amI think hes looking for this dan, your random motion script rewritten for it to work on color:
segDur = .5;// duration of each “segment” of random motion
minVal = [0,0,0,1];
maxVal = [1,1,1,1];seed = Math.floor(time/segDur);
segStart = seed*segDur;
seedRandom(seed,true);
startVal = random(minVal,maxVal);
seedRandom(seed+1,true);
endVal = random(minVal,maxVal);
ease(time,segStart,segStart + segDur, startVal, endVal);BTW full kudos to Dan for writing the expression, I just changed two lines so it would affect color. Is this what you were looking for?
Reply to this Discussion! Login or Sign Up