Index: src/vte.c
===================================================================
--- src/vte.c	(revision 1555)
+++ src/vte.c	(working copy)
@@ -1968,6 +1968,7 @@
 	guint i;
 	GdkColor color;
 	guint r, g, b;
+	gboolean have_colors = 0x3;
 	
 	g_return_if_fail(VTE_IS_TERMINAL(terminal));
 
@@ -1979,11 +1980,15 @@
 
 	/* Accept NULL as the default foreground and background colors if we
 	 * got a palette. */
-	if ((foreground == NULL) && (palette_size >= 8)) {
-		foreground = &palette[7];
+	if (foreground == NULL) {
+		gtk_widget_ensure_style (&terminal->widget);
+		foreground = &terminal->widget.style->text[GTK_STATE_NORMAL];
+		have_colors &= ~0x1;
 	}
-	if ((background == NULL) && (palette_size >= 8)) {
-		background = &palette[0];
+	if (background == NULL) {
+		gtk_widget_ensure_style (&terminal->widget);
+		background = &terminal->widget.style->base[GTK_STATE_NORMAL];
+		have_colors &= ~0x2;
 	}
 
 	memset(&color, 0, sizeof(color));
@@ -2071,7 +2076,7 @@
 	_vte_invalidate_all(terminal);
 
 	/* Track that we had a color palette set. */
-	terminal->pvt->palette_initialized = TRUE;
+	terminal->pvt->palette_initialized = have_colors != 0;
 }
 
 /**
@@ -3616,6 +3621,10 @@
 		vte_terminal_set_font_full(terminal, terminal->pvt->fontdesc,
 					   terminal->pvt->fontantialias);
 	}
+
+	if (!terminal->pvt->palette_initialized) {
+		vte_terminal_set_default_colors(terminal);
+	}
 }
 
 static void
