ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

change color to a specific value as a function of a noise layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Fabi Reck
change color to a specific value as a function of a noise layer
on Jan 23, 2020 at 2:17:25 pm

Hello,

i have several layers whose opacity is controlled by a composition with a noise effect.
I would like to change the color of the layers to three fixed values (EB3838, E8E348, 0EA4E3), also depending on a composition with a noise effect in it. For example, if the noise effect has a lightness value of 0-84 this corresponds to the color EB3838, 85-170 corresponds to E8E348 and 171-255 corresponds to 0EA4E3.

Thanks for your help.


Return to posts index

Dan Ebberts
Re: change color to a specific value as a function of a noise layer
on Jan 24, 2020 at 1:28:38 am

What does the expression that's controlling the opacity look like?

Dan



Return to posts index

Fabi Reck
Re: change color to a specific value as a function of a noise layer
on Jan 24, 2020 at 9:13:14 am

Hallo Dan,

here is the expression for the opacity of the layers.

sampleSize = [10,10];
target = thisComp.layer("noise Comp");
samplePos = transform.position;
rgb = target.sampleImage(samplePos, sampleSize, true, time);
hsl = rgbToHsl(rgb);
hsl[2]*100


Return to posts index

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