ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Shared variables

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Nicholas Deines
Shared variables
on Jun 9, 2020 at 8:11:53 pm

With the help of people on this forum I've created several color control expressions so that I can choose one color and have other colors be slight variants of that master color. I'm doing this with pie slices on a pie chart. That way the top and side color of each pie wedge have different lightness values, but the same hue.

What I'm wondering is if I can point my variables at a something that would be my "master variable" so that if I want to tweak the lighter color expression for 10 pie slices I can just change one "master variable".

Below is the lighter color expression for my first pie slice. I would like to make "l" = that master variable number, which I would repeat for all my pie slices.

But I don't know what to pick whip it to that could hold that variable. Another fill perhaps?

c = effect("Master 1")("Color")
h = 1; // hue factor
s = 1; // saturation factor
l = 1.35; // lightness factor
hsl = rgbToHsl(c);
hslToRgb([hsl[0],hsl[1]*s,hsl[2]*l,hsl[3]])


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]