• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Community Beginner ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

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?


TOPICS
Expressions

Views

104

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

LATEST

Thanks Mylenium,

 

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines