# Text with one word in a different color?

**URL:** <https://phaser.discourse.group/t/text-with-one-word-in-a-different-color/5775>\
**Category:** Phaser 3\
**Created:** [April 4, 2020, 10:32pm UTC](https://phaser.discourse.group/t/text-with-one-word-in-a-different-color/5775 "2020-04-04T22:32:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BdR](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/bdr/32/2621_2.png) [@BdR](https://phaser.discourse.group/u/BdR)\
**Post date:** [April 4, 2020, 10:32pm UTC](https://phaser.discourse.group/t/text-with-one-word-in-a-different-color/5775/1 "2020-04-04T22:32:03Z")

</div>

Is it possible to use the Phaser 3 [Text object](https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Text.html) to create a text where the sentense is one color, but one word is another color? So something like this:

![phaser3_font_question](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/e/e8c0d6c7d31e22f6982ce6c3c09585f04ee384ac.png)

I’ve looked in the documentation and I couldn’t find [any examples](https://labs.phaser.io/index.html?dir=game%20objects/text/static/) of this. If it’s not possible using the standard Text object, is there another way to accomplish this?

I know you could use 2 texts, one for the full sentence and one with a different color for the word, and then match the pixel position exactly so it overlaps the certain word. That would work for one particular sentence but I’m looking for more general approach for this, because there are several texts + different translations.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [April 4, 2020, 11:23pm UTC](https://phaser.discourse.group/t/text-with-one-word-in-a-different-color/5775/2 "2020-04-04T23:23:31Z")

</div>

No, but I think a DOM game object would work.
