+ // If all fails, use black/white
+ // FIXME: Use system theme here
+ GdkColor foreground, background;
+ gdk_color_parse("black", &foreground);
+ gdk_color_parse("white", &background);
+ GdkColor *current_foreground = &foreground;
+ GdkColor *current_background = &background;
+
+ gdk_threads_enter();
+
+ style_stream_colors(str, ¤t_foreground, ¤t_background);
+
+ if(reverse) {
+ GdkColor *temp = current_foreground;
+ current_foreground = current_background;
+ current_background = temp;
+ }
+
+ // Name the color
+ gchar *name = g_strdup_printf(
+ "zcolor:#%04X%04X%04X/#%04X%04X%04X",
+ current_foreground->red,
+ current_foreground->green,
+ current_foreground->blue,
+ current_background->red,
+ current_background->green,
+ current_background->blue
+ );
+
+ // Create a tag for the new colors if it doesn't exist yet
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(str->window->widget) );