Вы можете изменить цвет текста в Gtk.TextView с помощью TextTag.
В приведенном ниже примере создается тег ошибки, который выделяет текст красным фоном при вставке текста.
var textView = new Gtk.TextView();
var errorTag = new TextTag ("error");
errorTag.Background = "#dc3122";
errorTag.Foreground = "white";
errorTag.Weight = Pango.Weight.Bold;
textView.Buffer.TagTable.Add (errorTag);
string text = "foo";
// Insert text with tag.
TextIter start = textView.Buffer.EndIter;
textView.Buffer.InsertWithTags (ref start, text, errorTag);
text = "bar";
// Insert text then apply tag.
textView.Buffer.Insert (ref start, text);
start = textView.Buffer.GetIterAtOffset (5);
TextIter end = textView.Buffer.GetIterAtOffset (6);
textView.Buffer.ApplyTag (errorTag, start, end);
var vbox = new Gtk.VBox();
Add (vbox);
vbox.PackStart (textView);
vbox.ShowAll();
Вы знаете, как я мог это сделать в ответ на добавление пользователем текста? – evolvedmicrobe
Да. InsertWithTags эквивалентно Insert, а затем ApplyTag. Я добавил пример в исходный код. –