Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Change color of the shape by text value

  • Change color of the shape by text value

  • Gustavo Duque Estrada

    April 29, 2020 at 9:35 pm

    Hello guys

    I´m have little knowledge in the expressions like wiggle, sourceReactatime. But now i´m trying to change the color of one shape or object by a text value like this

    When the text is 50% the color of shape is green, otherwise the color of shape is red.

    someone can help me? THANKS

    i dont have the expressions yet

  • Dan Ebberts

    April 29, 2020 at 9:47 pm

    I think this does what you’re asking for. I’m not sure it’s what you meant though.

    txt = thisComp.layer(“Text”).text.sourceText;
    txt == “50%” ? [0,1,0,1] : [1,0,0,1]

    Dan

  • Gustavo Duque Estrada

    April 29, 2020 at 10:25 pm

    I would like to have color green when the text shows 50% or more and be red when the texts shows 49% or less

    like some statistics from excell when you have debts your money goes red.

    you know?

  • Dan Ebberts

    April 29, 2020 at 10:57 pm

    This should be closer:

    txt = thisComp.layer(“Text”).text.sourceText;
    parseFloat(txt) < 50 ? [0,1,0,1] : [1,0,0,1]

    Dan

  • Gustavo Duque Estrada

    April 29, 2020 at 11:09 pm

    UAU!!!

    THAT WORKS PERFECT! YOU ARE A GENIUS!

Viewing 1 - 5 of 5 posts

Log in to reply.

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