Skip to main content
Chris Muscat
Participant
July 27, 2021
Question

How do I change the color of two words in my source text.

  • July 27, 2021
  • 1 reply
  • 165 views

Hey there,

 

I have a great little expression that generates a sentenance. 

compName = thisComp.name;
textBefore = "The amount totals to ";
textAfter = ".";
textBefore+compName.substring(0, compName.indexOf("-"))+textAfter;

The amount totals to five.

How do I change the color of the compName and textAfter values?


This topic has been closed for replies.

1 reply

Mylenium
Legend
July 27, 2021

You don't. These are not scriptable with source text expressions. You will have to apply a text animator for Fill color, which in fact per your example would be the simplest solution, anyway, by setting it to per word and adjusting the range settings to always cover that last word. More complex string manipulation may of course require a different approach involving an expression selector or soem such thing, but give this a whirl as a start.

 

Mylenium

Chris Muscat
Participant
July 27, 2021

Thanks Mylenium,

 

Yes added range selector in the animator and it got me out trouble. Thank you for responding so quickly 🙂