If somebody is on a team that has a colored name, and you do something with them in a command block (e.g. /kill PLAYERNAME), then their name will show up colored in the output box. If you use the arrow keys to navigate around the text there, all the text to the right of the cursor will lose it's color.
Related issues
Comments

Fixed during the course of 1.13
Is this still an issue in the most recent versions (i.e. 1.10.2, or 16w42a) of Minecraft?