Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Numbers – Change color based on value

  • Numbers – Change color based on value

    Posted by Shane Sandler on November 30, 2015 at 6:00 pm

    I want the fill color on my generated number to be green when increasing, orange otherwise.

    This is my first time attempting to write a custom script.

    First, I do not know if my if statement correctly checks for an increase.
    Next, I do not know how to define the fill color.

    I attempted an array [255, 115, 0, 255]/255 and it said it was uninitialized.

    screenshot2015-11-30at10.55.17am.png

    if (value(effect("Numbers")("Value/Offset/Random Max")) > valueAtTime(time-.05)){
    ;
    }else{
    ;
    }

    Shane Sandler replied 10 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 30, 2015 at 6:46 pm

    This might be what you want:

    if (effect(“Numbers”)(“Value/Offset/Random Max”).speed > 0)
    [0,255,0,255]/255
    else
    [255,115,0,255]/255

    Dan

  • Shane Sandler

    November 30, 2015 at 8:44 pm

    Perfect! Thank you very much.

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