Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Mapping JSON data to colour ramp in AE

  • Mapping JSON data to colour ramp in AE

    Posted by Aoife Mccarthy on June 18, 2020 at 8:48 pm

    Me again! I’m trying to map values stored in a JSON file to a colour ramp in AE. Something like:

    linear(myData.value, 0, value_max, #FFFFFF, #000081)

    …in the fill colour property, if the linear expression could be used in this way. So taking a value from my dataset, figuring out where it sits along the colour gradient and applying that fill colour to the shape.

    Can anybody help?

    Aoife Mccarthy replied 6 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 18, 2020 at 9:33 pm

    Just as a test, you could play around with this, to see if it’s close to what you want:

    s = effect(“Slider Control”)(“Slider”);
    c1 = hexToRgb(“FFFFFFFF”);
    c2 = hexToRgb(“000081FF”);
    linear(s,0,100,c1,c2)

    Dan

  • Aoife Mccarthy

    June 19, 2020 at 10:46 am

    Ahhh I was just missing the hexToRgb expression, popped that in at it works a treat! Thanks for your help!

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