Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Changing shape color dynamically

    Scheduled Pinned Locked Moved
    Templates
    2
    2
    306
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pbretzundefined
      pbretz
      last edited by

      Hi,

      I’ve read through this thread “Re: Changing text color dynamically using Google spreadsheet” and am wondering if the same approach can be used for implementing dynamic color changes to shapes in an AE file?

      Pete

      Jeffundefined 1 Reply Last reply Reply Quote 0
      • Jeffundefined
        Jeff @pbretz
        last edited by

        @pbretz

        It’s relatively similar but actually a bit easier with Shape Layers. Since Shape Layers intrinsically have a “Color” property under the “Fill” section, there’s no need to add a Fill Effect to the layer. You can simply add the Expression directly to the “Color” value.

        Adobe has also added a more streamlined Expression that can convert hex codes to the RGB values needed to determine a layer’s color. This Expression:

        hexToRgb(""+thisComp.layer("layername").text.sourceText+"")
        

        should perform the same function as the Expression referenced in the previous post. The layername value will need to be swapped out for the name of the text layer with the hex information you’d like to use for the fill. Other than that, it should work the same.

        Let us know if you run into any issues, and we’ll see what we can do to help.

        Thanks!

        1 Reply Last reply Reply Quote 1
        • First post
          Last post