CreateJS / TweenJS

A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.
http://createjs.com/
MIT License
3.56k stars 967 forks source link

Feature Request | Possbility of changing color of only a paticular word in Text Class text #110

Closed Sannidhi-17 closed 3 years ago

Sannidhi-17 commented 3 years ago

I am trying to add color to a single word in the whole text that the user inputs in the Text class. text attribute but it changes the color of the whole text sentence and I am not finding any possible way to do that

Is it possible to change the color of a particular word in the whole text sentence? Example: "Welcome to ADVR world" in this sentence inputted by the user I want to add a different color to "ADVR" and rest should be set to white color

I tried this setting props in .set({color: 'red', text: 'ADVR'}) method but it removes the other text and adds only ADVR with red color

I want the whole sentence in white and only ADVR in red.

Is it possible to do that

If Yes, please it would be a great help to me Thank you in advance. @gskinner