Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Changing text Color after using SourceRectAtTime()

  • Changing text Color after using SourceRectAtTime()

    Posted by Anil N. junior on January 17, 2018 at 1:40 pm

    Hey there.

    I am working on after effects cc and I am using expressions.

    This is for a social media project. Please find tutorial below:

    https://www.youtube.com/watch?v=kI3yzx6CATg

    It’s a beautiful expression and really does cut down the time when I take it from AE to Pr.

    The one problem I face is, I need to know how or is there a way to be able to change part of the text Color in premiere pro?

    Because right now, what I need to change the colour in after effects, then bring it to premiere (where I obviously can’t)

    Is there an expression or a way to change it?

    Thank you in advance

    This is the expression on the size:
    s=thisComp.layer("Hello people");
    x=s.sourceRectAtTime(time-s.inPoint,true).width;
    y=s.sourceRectAtTime(time-s.inPoint,true).height;
    [x,y]

    This is the expression on the position:
    content("Rectangle 1").content("Rectangle Path 1").size/2

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Scott Mcgee replied 8 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Scott Mcgee

    January 18, 2018 at 8:26 am

    If you are on 2017.2/3? I think 2017.2 or higher. Use essential graphics and add a colour fill that you can change the colour of in Premiere.

    If not, based on Evan’s tutorial…Use fill still, but tie this in with a text layer and use a hex expression for the fill effect.

    You could set up your “Text” layer (source text) add this to the expression

    “0x” + text.sourceText;

    Then when you copy and paste the hex code it will automatically add the 0x at front.

    Then use this expression for the fill.

    txt = thisComp.layer(“Text”).text.sourceText;
    r = txt >> 16;
    g = (txt & 0x00ff00) >> 8;
    b = txt & 0xff;
    [r,g,b,255]/255

    Then like you change the names in premiere. Head over to the Master Effects Control and type in your hex code or copy and paste.

    Alternatively, if you are only wanting a handful of colours like I do…I set up and if or else for 9 colours. So if I type red, I get the red I want and so forth.

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