FORUMS: list search recent posts

Background Opposite color of Text Expression?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Goodliffe
Background Opposite color of Text Expression?
on Jun 24, 2020 at 8:51:41 pm

I'm certain there's a way to do this, I'm just not too great with expressions yet--could someone help me with typing up an expression that would allow a Solid Layer's color always be the complimentary color of another layer (with a "fill" effect on it). I have tons of text layers that I'm precompositing, adding a fill effect to, and changing the color of by keyframing the fill effect over the course of the project. It would save me tons of time if I was able to link another fill effect on a solid layer, or just the solid layer's base color to always be the complimentary of the Precomposed Text layer's fill color. Hope this makes sense and thanks.


Return to posts index

Richard Garabedain
Re: Background Opposite color of Text Expression?
on Jun 24, 2020 at 10:14:54 pm

well...all you would have to do is make sure the text and the background are the same color..then add an invert effect to either one


Return to posts index

Chaz Chester
Re: Background Opposite color of Text Expression?
on Jun 25, 2020 at 1:40:03 am

Adding the expression to Color property of your fill effect should do the trick:

target = thisComp.layer("Target"); //The layer you want to check (probably use a precomp for this)
colorpicker = thisComp.layer("Text"); //The anchor point of this layer determines where it checks
[1,1,1,1]-(target.sampleImage(target.fromWorld(colorpicker.position), [0.5,0.5], true, time)) //[1,1,1,1] is the RGBA value for white; by subtracting the result, we get the inverse.


Return to posts index

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