# Change color on text

**URL:** <https://forums.unrealengine.com/t/change-color-on-text/298234>\
**Category:** Rendering\
**Tags:** random, text, unreal-engine, color, textrendercomponent, question\
**Created:** [November 5, 2014, 5:17pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234 "2014-11-05T17:17:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![waxxan\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@waxxan\_1](https://forums.unrealengine.com/u/waxxan_1)\
**Post date:** [November 5, 2014, 5:17pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/1 "2014-11-05T17:17:32Z")

</div>

Im a total noob just playing around in BP trying to learn. In this case I just want to change the color on my textrendercomponent.  
The problem is it only works once. And I can clearly see when I press shift that get different values (from the print string) So the text should shift in red tones.

Any ideas?

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/8/478a6481e3c856a849d30633c5fadf24277d0b9f.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 5, 2014, 5:23pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/2 "2014-11-05T17:23:41Z")

</div>

Hi waxxab,

Did you set up a material instance dynamic? Check out the links below for more information on material instancing:

> **[Instanced Materials](https://docs.unrealengine.com/5.1/en-US/instanced-materials-in-unreal-engine/)**
>
> Hierarchical Material relationships that you to alter behavior and appearance of child Materials without shader recompilation.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![waxxan\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@waxxan\_1](https://forums.unrealengine.com/u/waxxan_1)\
**Post date:** [November 5, 2014, 5:36pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/3 "2014-11-05T17:36:36Z")

</div>

Nope, no materials or anything, just changing the color with “Set Text Render Color”. This was my next step.  
But why does it work once?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 5, 2014, 6:51pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/4 "2014-11-05T18:51:48Z")

</div>

Is this text render actor in a separate blueprint from your pawn or player controller? If so, set up a begin play\>Enable Input and set the player controller to 0 so you can actually affect it. See if that fixes the error.

---

<div class="post-metadata">

**Author:** ![waxxan\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@waxxan\_1](https://forums.unrealengine.com/u/waxxan_1)\
**Post date:** [November 5, 2014, 8:19pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/5 "2014-11-05T20:19:27Z")

</div>

Its in a separate BP, but i have already enabled the input on Player 0.  
But it works once, the color gets changed, so it kind of works. its when i press a second time nothing happens. And i can see that RandomStream seeds a new value, cos I print it to screen. But the color on the text component is not changing. Of course i can change to use materials, but I want to understand what is happening here.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 5, 2014, 8:37pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/6 "2014-11-05T20:37:33Z")

</div>

Hi waxxab,

I was able to reproduce this and can confirm that it is a bug. I have entered a bug report, UE-5045 to be assessed by the development staff. Thank you!

---

<div class="post-metadata">

**Author:** ![waxxan\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@waxxan\_1](https://forums.unrealengine.com/u/waxxan_1)\
**Post date:** [November 5, 2014, 8:49pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/7 "2014-11-05T20:49:03Z")

</div>

Ok, thanks. Then I was thinking correct I guess. Thanks for the fast feedback btw 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 6, 2014, 2:48pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/8 "2014-11-06T14:48:51Z")

</div>

Hi waxxab,

I realized my mistake and wanted to let you know. This is actually working as intended. What is occurring is that our colors are based on a 0-1 scale instead of 0-255. So effectively it has 255:256 chances to select the maximum value a color is going to be. Try setting your float in range to 0-1 and see if it works correctly after that.

---

<div class="post-metadata">

**Author:** ![waxxan\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@waxxan\_1](https://forums.unrealengine.com/u/waxxan_1)\
**Post date:** [November 10, 2014, 3:47pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/9 "2014-11-10T15:47:33Z")

</div>

Aha, okay. Is there another way of creating colors in the RGB space?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [November 10, 2014, 6:40pm UTC](https://forums.unrealengine.com/t/change-color-on-text/298234/10 "2014-11-10T18:40:45Z")

</div>

You can set the random range as you had it then normalize it so that it changes from the RGB scale to the 0-1 scale.
