- Home /
gui.label color change
I want to change the color of a GUI.Label using script
GUI.skin.label.hover.textColor = Color.blue;
GUI.skin.label.normal.textColor = Color.black;
GUI.skin.label.active.textColor = Color.yellow;
I want to change the color of label using scripts. The color is changing in GUI.skin in in inspector.
When using above script but it is not not working for label and box in game mode. I don't want to change the color using applying directly in skin in inspector. I want change through scripts.
Answer by Statement · Mar 03, 2011 at 11:38 AM
Use either of these (but don't forget to reset it after your GUI call or all other GUI gets tinted also):
Global tinting color for the GUI.
This will affect both backgrounds & text colors.
Global tinting color for all background elements rendered by the GUI.
This gets multiplied by color.
Tinting color for all text rendered by the GUI.
This gets multiplied by color.