Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Shared variables

  • Posted by Nicholas Deines on June 9, 2020 at 8:11 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]])

    Nicholas Deines replied 5 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    June 10, 2020 at 8:32 am

    You should add a slider control to your layer and pick whip that value.

    Andrei
    My Envato portfolio.

  • Nicholas Deines

    June 10, 2020 at 5:26 pm

    Thanks, Andrei! I actually figured that out yesterday after I posted the question.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy