ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How can I apply this expression to an image?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joshua Bowman
How can I apply this expression to an image?
on Dec 28, 2018 at 3:16:42 am

So I want to use this expression and add it to an image like shown in this video.https://www.youtube.com/watch?v=5N7ylsi1v8M How would I go by doing that, or does this not need an expression but something else? If it is an Expression, what do I apply it too?

hues = [0,30,60,120,180,240,300];
freq = .5; //changes per second
tran = .25; //seconds
idx1 = Math.floor(time*freq)%hues.length; //current hue index
idx2 = (idx1+1)%hues.length; //next hue index
state = linear(time%(1/freq),0,tran,0,100); //transition state (0-100)
hue = (hues[idx2]*state+hues[idx1]*(100-state))/100; // resulting hue
hslToRgb([hue/360,.85,.4,1])


Return to posts index

Kalleheikki Kannisto
Re: How can I apply this expression to an image?
on Dec 28, 2018 at 7:05:22 am

You need to apply it to something that has a color value in it, such as the tint effect color.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Joshua Bowman
Re: How can I apply this expression to an image?
on Dec 29, 2018 at 3:15:06 am

Im new to AE, how would I go by doing that?

Noob out!


Return to posts index


Kalleheikki Kannisto
Re: How can I apply this expression to an image?
on Dec 29, 2018 at 8:52:34 am

To apply an expression, you alt-click the stop watch of the property, in this case it would be the color swatch in some effect that has it. Taking the example of the Tint effect, apply the tint effect to your layer, expand the controls so that you can see the color swatch and apply the expression to it.
The Tint effect isn't really going to do what you want. The Change To Color effect is closer to what you want, applying the expression to the To color swatch. You'll need to make the From color match the original color of your layer.

NB. If the layer is multicolored, this won't work too well. In that case you're back to the Tint, but you will need to apply it to a copy of the layer on top of the original layer and set the blending mode of the top layer to Hue.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Joshua Bowman
Re: How can I apply this expression to an image?
on Dec 29, 2018 at 2:35:05 pm

cool thanks

Noob out!


Return to posts index

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