# UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there colors set to red and white, but staying the default black in the Scene and Game windows:

Here are the lines of code I am using to change the color

var textColor = beatBestTime ? "#FF0" : "FFF";

scoreText.text = "Time " + FormatTime (timeElapsed) + "\n<color="+textColor+">Best " + FormatTime (bestTime)+"</color>";


which I can verify are being run, but the color remains the same!

• Hmm, well according to the documentation, I would expect to see var textColor = beatBestTime ? "#FFFF00" : "#FFFFFF";. Notice the use of the # in both of the strings, and the usage of the full 6 characters. I'm not entirely sure this is what would fix your issue, but it would be more like what the engine expects. – Vaillancourt Feb 9 '16 at 2:31
• I don't think that is the problem, however I did try it and nothing has changed. – jasper Feb 9 '16 at 2:39