Copy link to clipboard
Copied
Hello, everybody. Unfortunately, my previous search has been inconclusive, so I'm trying here. Is it possible to create an object in After Effects that has the opposite color to the background?
In my case I want to make a text about a video. The text should always have the opposite color of the video. How is this possible?
Copy link to clipboard
Copied
Are you sure you mean the opposite? The opposite color is straight across the color wheel. Which values do you want to invert? Do you want to use color harmony rules? It's easy to pull a color from another layer that has a fill applied or to sample the color of another layer using an expression, but what you do with that information can return very different results.
Here I'm sampling the color of the fill property and applying that to the Fill Effect applied to three text layers. I then add Hue and saturation to each of the layers and shift the hue 180º for the opposite color and 120º plus and minus for left and right complement.
If you want to sample video instead of color you can animate on another layer you can use an expression. This one samples a 200-pixel diameter circle in the center of the Background layer and averages that color value.
lyr = thisComp.layer("Background");
lyr.sampleImage([width, height]/2, radius = [100, 100], postEffect = true, t = time)
If the background is a video layer and the colors change the color of the fill will also change. Setting the t value to 1 will sample the layer at 1 second.
Let us know exactly what you are trying to do and maybe we can help.
Copy link to clipboard
Copied
Hey, assuming there are layers A and B, where B drives original color:
1. Apply fill effect to layer A.
2. Link fill effect color value to layer B.
3. Apply invert effect to layer A.
Alternatively, since we are talking about video - are you sure, that what you described, is thats what you are looking for? Because if video has variety of colors - your text would look terrible taking that changing data into account.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now