I’m working with a typing game, and i want to change the color of letter in the text to red, only when i typed it correctly… like this: 
thanks in advance :-)

```
 string myString = txt.text;
    char[] myChars = myString.ToCharArray();

    foreach (char c in myChars)
    {
        txt.text = txt.text.Replace(c.ToString(), "<color=red>"+c+"</color>");
        break;
    }

```

[![enter image description here](https://i.stack.imgur.com/QEImj.png)](https://i.stack.imgur.com/QEImj.png)

[Updated Output](https://i.stack.imgur.com/u3w4i.png)