Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Change color with text in Premiere (Dynamic Link)

  • Dan Ebberts

    September 25, 2016 at 5:25 pm

    There must be more to that top expression…

    Dan

  • Dario De angelis

    September 25, 2016 at 5:36 pm

    He 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.sourceText

    Maybe 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 pm

    You’re sure that CONTROLS expression doesn’t have more than one line?

    Dan

  • Dario De angelis

    September 25, 2016 at 7:09 pm

    Not 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 pm

    No, 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 pm

    I 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 pm

    I 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 pm

    It 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 am

    If 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

  • Dario De angelis

    September 26, 2016 at 8:11 pm

    Thank you so much!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy