FORUMS: list search recent posts

Changing Color Overlay at keyframes?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Josh Pigford
Changing Color Overlay at keyframes?
on Apr 15, 2011 at 9:56:25 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?


Return to posts index


Dan Ebberts
Re: Changing Color Overlay at keyframes?
on Apr 15, 2011 at 10:49:57 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



Return to posts index

Josh Pigford
Re: Changing Color Overlay at keyframes?
on Apr 16, 2011 at 3:02:43 am

That's perfect Dan, thanks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]