Change the color of the string

Hey all, i have a “combat window” in my game, and i want to change the “destroyedName” color to red, and the “attackerName” to blue, but i cant figure out how to do this…

Here is my code:

//unity code

public string attackerName;

public string destroyedName;

private string combatLog;

public GUIStyle myStyle = new GUIStyle();

void Start ()
{

myStyle.fontStyle = FontStyle.Bold;
	
myStyle.fontSize = 11;

myStyle.normal.textColor = Color.red;

}

void CombatWindowFunction (int windowID)
{

GUILayout.Label(combatLog);

}

void OnGUI ()
{

if (attackerName !="")

{
combatLog = attackerName + " killed " + destroyedName + "

" + combatLog;
}

}

}

Try this one:

GUI.Label(new Rect(0, 0, 0, 0), combatLog, myStyle);

hey i’m not sure if you still need help but try this:

     combatLog = "<color=#ff0000>"+attackerName +"</color>" +" killed " + "<color=#0000ff>"+destroyedName + "</color>"+"

" + combatLog;