Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Changing Color Overlay at keyframes?

  • Changing Color Overlay at keyframes?

    Posted by Josh Pigford on April 15, 2011 at 9:56 pm

    Currently I’m setting the color in Color Overlay of a layer using this:

    comp("SETTINGS").layer("BLUE").layerStyle.colorOverlay.color

    Easy enough.

    But now I want to add an additional key frame on that layer so the color changes.

    Is there a way to use an expression to set the color at one key frame but then transition to the other color by the next keyframe?

    Josh Pigford replied 15 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 15, 2011 at 10:49 pm

    This should get you close. It starts with dark blue and eases to the other layer’s color between the first and second keyframes. It doesn’t do anything if there are less than two keyframes.


    startColor = [0,0,.5,1];
    endColor = comp("SETTINGS").layer("BLUE").layerStyle.colorOverlay.color;
    if (numKeys > 1){
    t1 = key(1).time;
    t2 = key(2).time;
    ease(time,t1,t2,startColor,endColor)
    }else
    value

    Dan

  • Josh Pigford

    April 16, 2011 at 3:02 am

    That’s perfect Dan, thanks!

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