Activity › Forums › Adobe After Effects Expressions › Change color with text in Premiere (Dynamic Link)
-
Change color with text in Premiere (Dynamic Link)
Posted by Dario De angelis on September 25, 2016 at 4:50 pmHi guys, I was following this Template tutorial (https://www.keenlive.com/renderbreak/2014/06/rigging-ae-comps-with-the-new-templates-feature/) for AE and Premiere but he doesn’t explain how he can change the color of the lower third in Adobe Premiere (min. 1:52) simply by typing the color name (“violet”, “red”, “blue”, etc…)
Dario De angelis replied 9 years, 7 months ago 2 Members · 10 Replies -
10 Replies
-
Dario De angelis
September 25, 2016 at 5:36 pmHe has a text layer called “Palette” to the bottom that he uses for Dynamic Link in Adobe Premiere.
“LEFT BOX” color is linked to the “Color Control” of the Null called “CONTROLS”
thisComp.layer("CONTROLS").effect("primary color")("Color")“CONTROLS” has a “Color control” linked to the “Palette” text layer on the bottom of the composition
paletteName = thisComp.layer("palette").text.sourceTextMaybe there is an expression in “Palette” text layer? Or maybe he has some expression (maybe linked to some “shy” level) that he doesn’t show ?
-
Dan Ebberts
September 25, 2016 at 5:46 pmYou’re sure that CONTROLS expression doesn’t have more than one line?
Dan
-
Dario De angelis
September 25, 2016 at 7:09 pmNot 100% sure but It have the “;” at the end.
I knew that “;” means the end of the expression, is that right?
-
Dan Ebberts
September 25, 2016 at 7:29 pmNo, the semi-colon means the end of a statement. It probably means there’s more that one (the last statement doesn’t have to have a semi-colon). Click in the expression field, Ctrl+C to copy it, then paste it somewhere and see what you get.
Dan
-
Dario De angelis
September 25, 2016 at 8:38 pmI doesn’t have the file project; it is a screen from the video that I linked in the original post.
So, any idea of what to do?
Can a “Color Control” read a color code (like “#FFFFF” or “255,255,255”) from a text source layer?
-
Dan Ebberts
September 25, 2016 at 9:57 pmI would guess what it’s doing is comparing the text to each color name (e.g. “violet”) and if it matches, use the normalized color array value for that color (which for violet would be something like [.75,0,1,1]).
Dan
-
Dario De angelis
September 25, 2016 at 11:56 pmIt worked.
This is the expression for “Color control”
txt = thisComp.layer("TEXTCONTROL").text.sourceText
if (txt == "violet") ([.75,0,1,1])
if (txt == "blue") ([0,0,1,1])Now (sorry if this is a stupid question) how can i find the color codes [like this (0,0,0,0)] for my palette?
In color picker there is the RGB format. -
Dan Ebberts
September 26, 2016 at 12:04 amIf you go into the Info panel menu and select “Decimal (0.0-1.0)”, then the color picker should give you the numbers you need. Or, just divide each RGB 0-255 value by 255.
Your expression probably needs a fail-safe in case it doesn’t find a color it’s looking for, like this:
txt = thisComp.layer("TEXTCONTROL").text.sourceText;
if (txt == "violet")
([.75,0,1,1])
else if (txt == "blue")
([0,0,1,1])
else
[.5,.5,.5,1];
Dan
Reply to this Discussion! Login or Sign Up
