Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Automatically change character colour with expression

  • Automatically change character colour with expression

    Posted by Ian Glover on April 24, 2021 at 12:16 pm

    Hi,

    I am trying to automatically control the colour of a set of numbers using an expression I found.

    The expression is added to my text on “property, fill colour, expression selector” and I have linked each number colour to a set of colour controls.

    The expression does change the colour of each number, but not to the values that I have set in each of my colour controls. See here: shorturl.at/uDOT9

    Am I missing something that is causing the colour to alter to the wrong value?

    I have tried changing the last line to *100/255 but this doesn’t work (apologies – my expression knowledge is very basic)

    Thanks for any help

    txt = text.sourceText;
    switch(txt[textIndex-1]){
    case "0":
    color = thisComp.layer("master control").effect("Color Control 0")("Color");
    break;
    case "1":
    color = thisComp.layer("master control").effect("Color Control 1")("Color");
    break;
    case "2":
    color = thisComp.layer("master control").effect("Color Control 2")("Color");
    break;
    case "3":
    color = thisComp.layer("master control").effect("Color Control 3")("Color");
    break;
    }
    [color[0],color[1],color[2]]*<wbr>100
    Ian Glover replied 5 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Filip Vandueren

    April 24, 2021 at 1:22 pm

    Your text should be Black with the text animator trying to add a White Fill, limited by the expression selector.

    If you have white text and a black fill+expression, your colors will be in effect inverted.

  • Ian Glover

    April 25, 2021 at 5:36 am

    That worked. Thanks for the help!

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