Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Object in After Effects with opposite color than the video in the background

New Here ,
Apr 03, 2020 Apr 03, 2020

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?

TOPICS
Expressions , FAQ , How to , Resources , User interface or workspaces
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2020 Apr 03, 2020

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.

Screenshot_2020-04-03 08.28.28_sIb3fv.png

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 03, 2020 Apr 03, 2020
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines