Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Assigning RGB value to color property

  • Assigning RGB value to color property

    Posted by Jim Schulpen on December 5, 2023 at 4:39 pm

    After several hours of tinkering I need to ask for help. I have a color value that is defined in one layer using colorValue = hexToRgb(hexvalue). I want to set a color property of an expression controller in another layer with this value. I was trying thisComp.layer(“Null 1”).nameofproperty.Color(colorValue); but that doesn’t seem to work. I tried making var colorValue global by defining it in a marker and retrieving it with eval(), but no luck.

    I’ve also approached the problem by using expressions in the Color property itself, using “colorValue” as input, but that doesn’t seem the right format (it’s not an array?).

    What would be your best approach for my goal? I can’t do all the scripting in the Color property itself because the script generates multiple colours that are needed at different places in the comp.

    Jim Schulpen replied 10 months ago 1 Member · 1 Reply
  • 1 Reply
  • Jim Schulpen

    December 6, 2023 at 11:50 am

    This problem is solved. I found out that calling a function from within a marker (and using eval() on a layer to ‘insert’ it) doesn’t work. I ended up putting all functions in a marker, and calling the main function from a layer after eval(). After that, the variables with the color information were available from any place in the comp.

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