ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression to calculate Color Blending Mode on 2 color values?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jacek Skrobiasz
Expression to calculate Color Blending Mode on 2 color values?
on Sep 10, 2019 at 11:53:29 am
Last Edited By Jacek Skrobiasz on Sep 10, 2019 at 3:46:19 pm

Hi all,

I try to make flickering light changes effects stack like this: https://vimeo.com/338472778
I made it with help of precompositing, but now I try to recreate it as an single adjustment to more convenient use.

So my question is: is there expression to calculate Color Blending Mode on 2 color values?
To be more specific:
I have sampled RGBvalue1 and RGBvalue2 and I want to make some expression on it to receive RGBresult as a result of LinearLight Blending Mode beetween the two, same as it would be in the following setup:
- Solid1 layer with color RGBvalue1 (lower)
- Solid2 layer with color RGBvalue2 (over previous one) with blending mode LinearLight (or any other standard blending mode to choose).

I didn't find any built-in command in AE's expressions to blend (mix) color values. Or I missed someting?

Or maybe some math on RGBvalue1 and RGBvalue2?
I found a webpage where LinearLight is defined as:
(Blend > 0.5) * (Target + 2*(Blend-0.5)) + (Blend <= 0.5) * (Target + 2*Blend - 1)

But I struggle how convert it to AE's JavaScript expression.


Return to posts index

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