Вы можете использовать этот кусок кода:
private void richTextBox_LOG_write_text(string text, Color text_color, Color background_color)
{
try
{
if(richTextBox_LOG.InvokeRequired == true)
{
Invoke(new Delegate_void_string_colortext_colorbackground(richTextBox_LOG_write_text), new object[] { text, text_color, background_color });
}
int text_size = richTextBox_LOG.Text.Length;
richTextBox_LOG.AppendText(text);
richTextBox_LOG.Select(text_size, text.Length);
if(text_color == null)
{
text_color = Color.Black;
}
richTextBox_LOG.SelectionColor = text_color;
if(background_color != null)
{
richTextBox_LOG.SelectionBackColor = background_color;
}
}
catch { }
}