As far as my current knowledge is concerned, this effect can only be implemented in the RichTextBox control. The general idea of implementation is to select a character or a certain segment of characters and then change the color.
select a character
richTextBox2.SelectionStart = 0;
richTextBox2.SelectionLength = 1;
/*选中内容的起点,选中内容长度,上面两行代码的意思即选择了第一个字符*/
change color
richTextBox2.SelectionColor = Color.Red;
//注意,先选中再变颜色
Of course, for user experience, after changing the color, put the cursor at the end of the string.
ichTextBox2.SelectionStart = text.Length + 1;
richTextBox2.SelectionLength = 1;