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.

Use either of these (but don't forget to reset it after your GUI call or all other GUI gets tinted also):

GUI.color

Global tinting color for the GUI.

This will affect both backgrounds & text colors.

GUI.color

GUI.backgroundColor

Global tinting color for all background elements rendered by the GUI.

This gets multiplied by color.

GUI.backgroundColor

GUI.contentColor.

Tinting color for all text rendered by the GUI.

This gets multiplied by color.

GUI.contentColor