diff --git a/src/vte.c b/src/vte.c
index 55c5b82..f642178 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -343,11 +343,11 @@ _vte_terminal_ring_insert (VteTerminal *terminal, glong position, gboolean fill)
 	VteRing *ring = terminal->pvt->screen->row_data;
 	while (G_UNLIKELY (_vte_ring_next (ring) < position)) {
 		row = _vte_ring_append (ring);
-		if (terminal->pvt->screen->fill_defaults.attr.back != VTE_DEF_BG)
+		if (terminal->pvt->screen->fill_defaults.attr.back != VTE_DEFAULT_BG)
 			_vte_row_data_fill (row, &terminal->pvt->screen->fill_defaults, terminal->column_count);
 	}
 	row = _vte_ring_insert (ring, position);
-	if (fill && terminal->pvt->screen->fill_defaults.attr.back != VTE_DEF_BG)
+	if (fill && terminal->pvt->screen->fill_defaults.attr.back != VTE_DEFAULT_BG)
 		_vte_row_data_fill (row, &terminal->pvt->screen->fill_defaults, terminal->column_count);
 	return row;
 }
@@ -2559,12 +2559,12 @@ _vte_terminal_set_color_internal(VteTerminal *terminal,
 
 	/* If we're setting the background color, set the background color
 	 * on the widget as well. */
-	if (entry == VTE_DEF_BG) {
+	if (entry == VTE_DEFAULT_BG) {
 		vte_terminal_queue_background_update(terminal);
 	}
 
 	/* and redraw */
-	if (entry == VTE_CUR_BG)
+	if (entry == VTE_CURSOR_BG)
 		_vte_invalidate_cursor_once(terminal, FALSE);
 	else
 		_vte_invalidate_all (terminal);
@@ -2672,7 +2672,7 @@ vte_terminal_set_color_foreground(VteTerminal *terminal,
 	_vte_debug_print(VTE_DEBUG_MISC,
 			"Set foreground color to (%04x,%04x,%04x).\n",
 			foreground->red, foreground->green, foreground->blue);
-	_vte_terminal_set_color_internal(terminal, VTE_DEF_FG, VTE_COLOR_SOURCE_API, foreground);
+	_vte_terminal_set_color_internal(terminal, VTE_DEFAULT_FG, VTE_COLOR_SOURCE_API, foreground);
 }
 
 /**
@@ -2694,7 +2694,7 @@ vte_terminal_set_color_background(VteTerminal *terminal,
 	_vte_debug_print(VTE_DEBUG_MISC,
 			"Set background color to (%04x,%04x,%04x).\n",
 			background->red, background->green, background->blue);
-	_vte_terminal_set_color_internal(terminal, VTE_DEF_BG, VTE_COLOR_SOURCE_API, background);
+	_vte_terminal_set_color_internal(terminal, VTE_DEFAULT_BG, VTE_COLOR_SOURCE_API, background);
 }
 
 /**
@@ -2724,7 +2724,7 @@ vte_terminal_set_color_cursor(VteTerminal *terminal,
 		_vte_debug_print(VTE_DEBUG_MISC,
 				"Reset cursor color.\n");
 	}
-	_vte_terminal_set_color_internal(terminal, VTE_CUR_BG, VTE_COLOR_SOURCE_API, cursor_background);
+	_vte_terminal_set_color_internal(terminal, VTE_CURSOR_BG, VTE_COLOR_SOURCE_API, cursor_background);
 }
 
 /**
@@ -2733,6 +2733,7 @@ vte_terminal_set_color_cursor(VteTerminal *terminal,
  * @highlight_background: (allow-none): the new color to use for highlighted text, or %NULL
  *
  * Sets the background color for text which is highlighted.  If %NULL,
+ * it is unset.  If neither highlight background nor highlight foreground are set,
  * highlighted text (which is usually highlighted because it is selected) will
  * be drawn with foreground and background colors reversed.
  *
@@ -2746,15 +2747,46 @@ vte_terminal_set_color_highlight(VteTerminal *terminal,
 
 	if (highlight_background != NULL) {
 		_vte_debug_print(VTE_DEBUG_MISC,
-				"Set highlight color to (%04x,%04x,%04x).\n",
+				"Set highlight background color to (%04x,%04x,%04x).\n",
 				highlight_background->red,
 				highlight_background->green,
 				highlight_background->blue);
 	} else {
 		_vte_debug_print(VTE_DEBUG_MISC,
-				"Reset highlight color.\n");
+				"Reset highlight background color.\n");
 	}
-	_vte_terminal_set_color_internal(terminal, VTE_DEF_HL, VTE_COLOR_SOURCE_API, highlight_background);
+	_vte_terminal_set_color_internal(terminal, VTE_HIGHLIGHT_BG, VTE_COLOR_SOURCE_API, highlight_background);
+}
+
+/**
+ * vte_terminal_set_color_highlight_foreground:
+ * @terminal: a #VteTerminal
+ * @highlight_foreground: (allow-none): the new color to use for highlighted text, or %NULL
+ *
+ * Sets the foreground color for text which is highlighted.  If %NULL,
+ * it is unset.  If neither highlight background nor highlight foreground are set,
+ * highlighted text (which is usually highlighted because it is selected) will
+ * be drawn with foreground and background colors reversed.
+ *
+ * Since: 0.36
+ */
+void
+vte_terminal_set_color_highlight_foreground(VteTerminal *terminal,
+					    const GdkColor *highlight_foreground)
+{
+	g_return_if_fail(VTE_IS_TERMINAL(terminal));
+
+	if (highlight_foreground != NULL) {
+		_vte_debug_print(VTE_DEBUG_MISC,
+				"Set highlight foreground color to (%04x,%04x,%04x).\n",
+				highlight_foreground->red,
+				highlight_foreground->green,
+				highlight_foreground->blue);
+	} else {
+		_vte_debug_print(VTE_DEBUG_MISC,
+				"Reset highlight foreground color.\n");
+	}
+	_vte_terminal_set_color_internal(terminal, VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_API, highlight_foreground);
 }
 
 /**
@@ -2842,7 +2874,7 @@ vte_terminal_set_colors(VteTerminal *terminal,
 			color.red = color.green = color.blue = shade | shade << 8;
 		}
 		else switch (i) {
-			case VTE_DEF_BG:
+			case VTE_DEFAULT_BG:
 				if (background != NULL) {
 					color = *background;
 				} else {
@@ -2851,7 +2883,7 @@ vte_terminal_set_colors(VteTerminal *terminal,
 					color.green = 0;
 				}
 				break;
-			case VTE_DEF_FG:
+			case VTE_DEFAULT_FG:
 				if (foreground != NULL) {
 					color = *foreground;
 				} else {
@@ -2861,21 +2893,24 @@ vte_terminal_set_colors(VteTerminal *terminal,
 				}
 				break;
 			case VTE_BOLD_FG:
-				vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEF_FG),
-							   _vte_terminal_get_color(terminal, VTE_DEF_BG),
+				vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEFAULT_FG),
+							   _vte_terminal_get_color(terminal, VTE_DEFAULT_BG),
 							   1.8,
 							   &color);
 				break;
 			case VTE_DIM_FG:
-				vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEF_FG),
-							   _vte_terminal_get_color(terminal, VTE_DEF_BG),
+				vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEFAULT_FG),
+							   _vte_terminal_get_color(terminal, VTE_DEFAULT_BG),
 							   0.5,
 							   &color);
 				break;
-			case VTE_DEF_HL:
+			case VTE_HIGHLIGHT_BG:
 				unset = TRUE;
 				break;
-			case VTE_CUR_BG:
+			case VTE_HIGHLIGHT_FG:
+				unset = TRUE;
+				break;
+			case VTE_CURSOR_BG:
 				unset = TRUE;
 				break;
 			}
@@ -2928,8 +2963,8 @@ vte_terminal_set_color_bold_rgba(VteTerminal *terminal,
 
 	if (bold == NULL)
 	{
-		vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEF_FG),
-					   _vte_terminal_get_color(terminal, VTE_DEF_BG),
+		vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEFAULT_FG),
+					   _vte_terminal_get_color(terminal, VTE_DEFAULT_BG),
 					   1.8,
 					   &color);
 	}
@@ -2959,8 +2994,8 @@ vte_terminal_set_color_dim_rgba(VteTerminal *terminal,
 
 	if (dim == NULL)
 	{
-		vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEF_FG),
-					   _vte_terminal_get_color(terminal, VTE_DEF_BG),
+		vte_terminal_generate_bold(_vte_terminal_get_color(terminal, VTE_DEFAULT_FG),
+					   _vte_terminal_get_color(terminal, VTE_DEFAULT_BG),
 					   0.5,
 					   &color);
 	}
@@ -3039,6 +3074,7 @@ vte_terminal_set_color_cursor_rgba(VteTerminal *terminal,
  * @highlight_background: (allow-none): the new color to use for highlighted text, or %NULL
  *
  * Sets the background color for text which is highlighted.  If %NULL,
+ * it is unset.  If neither highlight background nor highlight foreground are set,
  * highlighted text (which is usually highlighted because it is selected) will
  * be drawn with foreground and background colors reversed.
  *
@@ -3055,6 +3091,28 @@ vte_terminal_set_color_highlight_rgba(VteTerminal *terminal,
 }
 
 /**
+ * vte_terminal_set_color_highlight_foreground_rgba:
+ * @terminal: a #VteTerminal
+ * @highlight_foreground: (allow-none): the new color to use for highlighted text, or %NULL
+ *
+ * Sets the foreground color for text which is highlighted.  If %NULL,
+ * it is unset.  If neither highlight background nor highlight foreground are set,
+ * highlighted text (which is usually highlighted because it is selected) will
+ * be drawn with foreground and background colors reversed.
+ *
+ * Since: 0.36
+ */
+void
+vte_terminal_set_color_highlight_foreground_rgba(VteTerminal *terminal,
+						 const GdkRGBA *highlight_foreground)
+{
+	GdkColor color;
+
+	vte_terminal_set_color_highlight_foreground(terminal,
+                                                    gdk_color_from_rgba(&color, highlight_foreground));
+}
+
+/**
  * vte_terminal_set_colors_rgba:
  * @terminal: a #VteTerminal
  * @foreground: (allow-none): the new foreground color, or %NULL
@@ -3231,7 +3289,7 @@ _vte_terminal_cursor_down (VteTerminal *terminal)
 		}
 
 		/* Match xterm and fill the new row when scrolling. */
-		if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
+		if (screen->fill_defaults.attr.back != VTE_DEFAULT_BG) {
 			VteRowData *rowdata;
 			rowdata = _vte_terminal_ensure_row (terminal);
 			_vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
@@ -9410,15 +9468,15 @@ vte_terminal_determine_colors_internal(VteTerminal *terminal,
 
 	/* Reverse-mode switches default fore and back colors */
 	if (G_UNLIKELY (terminal->pvt->screen->reverse_mode)) {
-		if (fore == VTE_DEF_FG)
-			fore = VTE_DEF_BG;
-		if (back == VTE_DEF_BG)
-			back = VTE_DEF_FG;
+		if (fore == VTE_DEFAULT_FG)
+			fore = VTE_DEFAULT_BG;
+		if (back == VTE_DEFAULT_BG)
+			back = VTE_DEFAULT_FG;
 	}
 
 	/* Handle bold by using set bold color or brightening */
 	if (cell->attr.bold) {
-		if (fore == VTE_DEF_FG)
+		if (fore == VTE_DEFAULT_FG)
 			fore = VTE_BOLD_FG;
 		else if (fore >= VTE_LEGACY_COLORS_OFFSET && fore < VTE_LEGACY_COLORS_OFFSET + VTE_LEGACY_COLOR_SET_SIZE) {
 			fore += VTE_COLOR_BRIGHT_OFFSET;
@@ -9427,7 +9485,7 @@ vte_terminal_determine_colors_internal(VteTerminal *terminal,
 
 	/* Handle half similarly */
 	if (cell->attr.half) {
-		if (fore == VTE_DEF_FG)
+		if (fore == VTE_DEFAULT_FG)
 			fore = VTE_DIM_FG;
 		else if (fore >= VTE_LEGACY_COLORS_OFFSET && fore < VTE_LEGACY_COLORS_OFFSET + VTE_LEGACY_COLOR_SET_SIZE)
 			fore = corresponding_dim_index[fore - VTE_LEGACY_COLORS_OFFSET];
@@ -9444,20 +9502,27 @@ vte_terminal_determine_colors_internal(VteTerminal *terminal,
 		swap (&fore, &back);
 	}
 
-	/* Selection: use hightlight back, or inverse */
+	/* Selection: use hightlight back/fore, or inverse */
 	if (selected) {
 		/* XXX what if hightlight back is same color as current back? */
-		if (_vte_terminal_get_color(terminal, VTE_DEF_HL) != NULL)
-			back = VTE_DEF_HL;
-		else
+		gboolean do_swap = TRUE;
+		if (_vte_terminal_get_color(terminal, VTE_HIGHLIGHT_BG) != NULL) {
+			back = VTE_HIGHLIGHT_BG;
+			do_swap = FALSE;
+		}
+		if (_vte_terminal_get_color(terminal, VTE_HIGHLIGHT_FG) != NULL) {
+			fore = VTE_HIGHLIGHT_FG;
+			do_swap = FALSE;
+		}
+		if (do_swap)
 			swap (&fore, &back);
 	}
 
 	/* Cursor: use cursor back, or inverse */
 	if (cursor) {
 		/* XXX what if cursor back is same color as current back? */
-		if (_vte_terminal_get_color(terminal, VTE_CUR_BG) != NULL)
-			back = VTE_CUR_BG;
+		if (_vte_terminal_get_color(terminal, VTE_CURSOR_BG) != NULL)
+			back = VTE_CURSOR_BG;
 		else
 			swap (&fore, &back);
 	}
@@ -9565,7 +9630,7 @@ vte_terminal_draw_graphic(VteTerminal *terminal, vteunistr c,
 
         width = column_width * columns;
 
-	if ((back != VTE_DEF_BG) || draw_default_bg) {
+	if ((back != VTE_DEFAULT_BG) || draw_default_bg) {
 		vte_terminal_fill_rectangle(terminal,
 					    &bg,
 					    x, y, width, row_height);
@@ -10352,7 +10417,7 @@ vte_terminal_draw_cells(VteTerminal *terminal,
 			items[i].y += terminal->pvt->inner_border.top;
 			columns += items[i].columns;
 		}
-		if (clear && (draw_default_bg || back != VTE_DEF_BG)) {
+		if (clear && (draw_default_bg || back != VTE_DEFAULT_BG)) {
 			gint bold_offset = _vte_draw_has_bold(terminal->pvt->draw,
 									VTE_DRAW_BOLD) ? 0 : bold;
 			_vte_draw_fill_rectangle(terminal->pvt->draw,
@@ -10721,7 +10786,7 @@ vte_terminal_draw_rows(VteTerminal *terminal,
 					bold = cell && cell->attr.bold;
 					j += cell ? cell->attr.columns : 1;
 				}
-				if (back != VTE_DEF_BG) {
+				if (back != VTE_DEFAULT_BG) {
 					PangoColor bg;
 					gint bold_offset = _vte_draw_has_bold(terminal->pvt->draw,
 											VTE_DRAW_BOLD) ? 0 : bold;
@@ -10750,7 +10815,7 @@ vte_terminal_draw_rows(VteTerminal *terminal,
 					j++;
 				}
 				vte_terminal_determine_colors(terminal, NULL, selected, &fore, &back);
-				if (back != VTE_DEF_BG) {
+				if (back != VTE_DEFAULT_BG) {
 					PangoColor bg;
 					vte_terminal_get_rgb_from_index(terminal, back, &bg);
 					_vte_draw_fill_rectangle (terminal->pvt->draw,
@@ -13519,7 +13584,7 @@ vte_terminal_background_update(VteTerminal *terminal)
 	_vte_debug_print(VTE_DEBUG_MISC|VTE_DEBUG_EVENTS,
 			"Updating background image.\n");
 
-	entry = _vte_terminal_get_color(terminal, VTE_DEF_BG);
+	entry = _vte_terminal_get_color(terminal, VTE_DEFAULT_BG);
 	_vte_debug_print(VTE_DEBUG_BG,
 			 "Setting background color to (%d, %d, %d, %d).\n",
 			 entry->red, entry->green, entry->blue,
diff --git a/src/vte.h b/src/vte.h
index 46ae965..ce479c6 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -325,6 +325,8 @@ void vte_terminal_set_color_cursor(VteTerminal *terminal,
 				   const GdkColor *cursor_background);
 void vte_terminal_set_color_highlight(VteTerminal *terminal,
 				      const GdkColor *highlight_background);
+void vte_terminal_set_color_highlight_foreground(VteTerminal *terminal,
+						 const GdkColor *highlight_foreground);
 void vte_terminal_set_colors(VteTerminal *terminal,
 			     const GdkColor *foreground,
 			     const GdkColor *background,
@@ -344,6 +346,8 @@ void vte_terminal_set_color_cursor_rgba(VteTerminal *terminal,
 					const GdkRGBA *cursor_background);
 void vte_terminal_set_color_highlight_rgba(VteTerminal *terminal,
 					   const GdkRGBA *highlight_background);
+void vte_terminal_set_color_highlight_foreground_rgba(VteTerminal *terminal,
+						      const GdkRGBA *highlight_foreground);
 void vte_terminal_set_colors_rgba(VteTerminal *terminal,
 				  const GdkRGBA *foreground,
 				  const GdkRGBA *background,
diff --git a/src/vterowdata.h b/src/vterowdata.h
index d8f833f..10e2140 100644
--- a/src/vterowdata.h
+++ b/src/vterowdata.h
@@ -26,13 +26,14 @@
 G_BEGIN_DECLS
 
 
-#define VTE_DEF_FG			256
-#define VTE_DEF_BG			257
+#define VTE_DEFAULT_FG			256
+#define VTE_DEFAULT_BG			257
 #define VTE_BOLD_FG			258
 #define VTE_DIM_FG			259
-#define VTE_DEF_HL                      260
-#define VTE_CUR_BG			261
-#define VTE_PALETTE_SIZE		262
+#define VTE_HIGHLIGHT_FG		260
+#define VTE_HIGHLIGHT_BG		261
+#define VTE_CURSOR_BG			262
+#define VTE_PALETTE_SIZE		263
 
 
 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6)
@@ -110,8 +111,8 @@ static const VteIntCell basic_cell = {
 			1, /* columns */
 			0, /* bold */
 			0, /* italic */
-			VTE_DEF_FG, /* fore */
-			VTE_DEF_BG, /* back */
+			VTE_DEFAULT_FG, /* fore */
+			VTE_DEFAULT_BG, /* back */
 
 			0, /* standout */
 			0, /* underline */
diff --git a/src/vteseq-n.gperf b/src/vteseq-n.gperf
index 050e83e..388c98f 100644
--- a/src/vteseq-n.gperf
+++ b/src/vteseq-n.gperf
@@ -101,9 +101,9 @@ struct vteseq_n_struct {
 "change-highlight-background-colors-bel", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_highlight_background_color_bel)
 "change-highlight-background-colors-st", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_highlight_background_color_st)
 "reset-highlight-background-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_reset_highlight_background_color)
-#"change-highlight-foreground-colors-bel", VTE_SEQUENCE_HANDLER_NULL
-#"change-highlight-foreground-colors-st", VTE_SEQUENCE_HANDLER_NULL
-#"reset-highlight-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
+"change-highlight-foreground-colors-bel", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_highlight_foreground_color_bel)
+"change-highlight-foreground-colors-st", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_highlight_foreground_color_st)
+"reset-highlight-foreground-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_reset_highlight_foreground_color)
 #"enable-filter-rectangle", VTE_SEQUENCE_HANDLER_NULL
 "insert-blank-characters", VTE_SEQUENCE_HANDLER(vte_sequence_handler_insert_blank_characters)
 #"invoke-g2-character-set", VTE_SEQUENCE_HANDLER_NULL
diff --git a/src/vteseq.c b/src/vteseq.c
index 62a4fa7..28cc79b 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -1144,7 +1144,7 @@ vte_sequence_handler_cd (VteTerminal *terminal, GValueArray *params)
 			rowdata = _vte_terminal_ring_append (terminal, FALSE);
 		}
 		/* Pad out the row. */
-		if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
+		if (screen->fill_defaults.attr.back != VTE_DEFAULT_BG) {
 			_vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
 		}
 		rowdata->attr.soft_wrapped = 0;
@@ -1176,7 +1176,7 @@ vte_sequence_handler_ce (VteTerminal *terminal, GValueArray *params)
 		/* We've modified the display.  Make a note of it. */
 		terminal->pvt->text_deleted_flag = TRUE;
 	}
-	if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
+	if (screen->fill_defaults.attr.back != VTE_DEFAULT_BG) {
 		/* Add enough cells to fill out the row. */
 		_vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
 	}
@@ -1445,7 +1445,7 @@ vte_sequence_handler_dc (VteTerminal *terminal, GValueArray *params)
 		/* Remove the column. */
 		if (col < len) {
 			_vte_row_data_remove (rowdata, col);
-			if (screen->fill_defaults.attr.back != VTE_DEF_BG) {
+			if (screen->fill_defaults.attr.back != VTE_DEFAULT_BG) {
 				_vte_row_data_fill (rowdata, &screen->fill_defaults, terminal->column_count);
 				len = terminal->column_count;
 			}
@@ -1920,7 +1920,7 @@ vte_sequence_handler_change_color_internal (VteTerminal *terminal, GValueArray *
 		for (i = 0; pairs[i] && pairs[i + 1]; i += 2) {
 			idx = strtoul (pairs[i], (char **) NULL, 10);
 
-			if (idx >= VTE_DEF_FG)
+			if (idx >= VTE_DEFAULT_FG)
 				continue;
 
 			if (vte_parse_color (pairs[i + 1], &color)) {
@@ -1973,13 +1973,13 @@ vte_sequence_handler_reset_color (VteTerminal *terminal, GValueArray *params)
 			if (!G_VALUE_HOLDS_LONG (value))
 				continue;
 			idx = g_value_get_long (value);
-			if (idx < 0 || idx >= VTE_DEF_FG)
+			if (idx < 0 || idx >= VTE_DEFAULT_FG)
 				continue;
 
 			_vte_terminal_set_color_internal(terminal, idx, VTE_COLOR_SOURCE_ESCAPE, NULL);
 		}
 	} else {
-		for (idx = 0; idx < VTE_DEF_FG; idx++) {
+		for (idx = 0; idx < VTE_DEFAULT_FG; idx++) {
 			_vte_terminal_set_color_internal(terminal, idx, VTE_COLOR_SOURCE_ESCAPE, NULL);
 		}
 	}
@@ -2570,7 +2570,7 @@ vte_sequence_handler_character_attributes (VteTerminal *terminal, GValueArray *p
 		}
 		case 39:
 			/* default foreground */
-			terminal->pvt->screen->defaults.attr.fore = VTE_DEF_FG;
+			terminal->pvt->screen->defaults.attr.fore = VTE_DEFAULT_FG;
 			break;
 		case 40:
 		case 41:
@@ -2585,7 +2585,7 @@ vte_sequence_handler_character_attributes (VteTerminal *terminal, GValueArray *p
 	     /* case 48: was handled above at 38 to avoid code duplication */
 		case 49:
 			/* default background */
-			terminal->pvt->screen->defaults.attr.back = VTE_DEF_BG;
+			terminal->pvt->screen->defaults.attr.back = VTE_DEFAULT_BG;
 			break;
 		case 90:
 		case 91:
@@ -3585,7 +3585,7 @@ static void
 vte_sequence_handler_change_foreground_color_bel (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_DEF_FG, -1, 10, BEL);
+							    VTE_DEFAULT_FG, -1, 10, BEL);
 }
 
 /* Change the default foreground cursor, ST terminated */
@@ -3593,14 +3593,14 @@ static void
 vte_sequence_handler_change_foreground_color_st (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_DEF_FG, -1, 10, ST);
+							    VTE_DEFAULT_FG, -1, 10, ST);
 }
 
 /* Reset the default foreground color */
 static void
 vte_sequence_handler_reset_foreground_color (VteTerminal *terminal, GValueArray *params)
 {
-	_vte_terminal_set_color_internal(terminal, VTE_DEF_FG, VTE_COLOR_SOURCE_ESCAPE, NULL);
+	_vte_terminal_set_color_internal(terminal, VTE_DEFAULT_FG, VTE_COLOR_SOURCE_ESCAPE, NULL);
 }
 
 /* Change the default background cursor, BEL terminated */
@@ -3608,7 +3608,7 @@ static void
 vte_sequence_handler_change_background_color_bel (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_DEF_BG, -1, 11, BEL);
+							    VTE_DEFAULT_BG, -1, 11, BEL);
 }
 
 /* Change the default background cursor, ST terminated */
@@ -3616,14 +3616,14 @@ static void
 vte_sequence_handler_change_background_color_st (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_DEF_BG, -1, 11, ST);
+							    VTE_DEFAULT_BG, -1, 11, ST);
 }
 
 /* Reset the default background color */
 static void
 vte_sequence_handler_reset_background_color (VteTerminal *terminal, GValueArray *params)
 {
-	_vte_terminal_set_color_internal(terminal, VTE_DEF_BG, VTE_COLOR_SOURCE_ESCAPE, NULL);
+	_vte_terminal_set_color_internal(terminal, VTE_DEFAULT_BG, VTE_COLOR_SOURCE_ESCAPE, NULL);
 }
 
 /* Change the color of the cursor, BEL terminated */
@@ -3631,7 +3631,7 @@ static void
 vte_sequence_handler_change_cursor_color_bel (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_CUR_BG, VTE_DEF_FG, 12, BEL);
+							    VTE_CURSOR_BG, VTE_DEFAULT_FG, 12, BEL);
 }
 
 /* Change the color of the cursor, ST terminated */
@@ -3639,14 +3639,14 @@ static void
 vte_sequence_handler_change_cursor_color_st (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_CUR_BG, VTE_DEF_FG, 12, ST);
+							    VTE_CURSOR_BG, VTE_DEFAULT_FG, 12, ST);
 }
 
 /* Reset the color of the cursor */
 static void
 vte_sequence_handler_reset_cursor_color (VteTerminal *terminal, GValueArray *params)
 {
-	_vte_terminal_set_color_internal(terminal, VTE_CUR_BG, VTE_COLOR_SOURCE_ESCAPE, NULL);
+	_vte_terminal_set_color_internal(terminal, VTE_CURSOR_BG, VTE_COLOR_SOURCE_ESCAPE, NULL);
 }
 
 /* Change the highlight background color, BEL terminated */
@@ -3654,7 +3654,7 @@ static void
 vte_sequence_handler_change_highlight_background_color_bel (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_DEF_HL, VTE_DEF_FG, 17, BEL);
+							    VTE_HIGHLIGHT_BG, VTE_DEFAULT_FG, 17, BEL);
 }
 
 /* Change the highlight background color, ST terminated */
@@ -3662,14 +3662,37 @@ static void
 vte_sequence_handler_change_highlight_background_color_st (VteTerminal *terminal, GValueArray *params)
 {
 	vte_sequence_handler_change_special_color_internal (terminal, params,
-							    VTE_DEF_HL, VTE_DEF_FG, 17, ST);
+							    VTE_HIGHLIGHT_BG, VTE_DEFAULT_FG, 17, ST);
 }
 
 /* Reset the highlight background color */
 static void
 vte_sequence_handler_reset_highlight_background_color (VteTerminal *terminal, GValueArray *params)
 {
-	_vte_terminal_set_color_internal(terminal, VTE_DEF_HL, VTE_COLOR_SOURCE_ESCAPE, NULL);
+	_vte_terminal_set_color_internal(terminal, VTE_HIGHLIGHT_BG, VTE_COLOR_SOURCE_ESCAPE, NULL);
+}
+
+/* Change the highlight foreground color, BEL terminated */
+static void
+vte_sequence_handler_change_highlight_foreground_color_bel (VteTerminal *terminal, GValueArray *params)
+{
+	vte_sequence_handler_change_special_color_internal (terminal, params,
+							    VTE_HIGHLIGHT_FG, VTE_DEFAULT_BG, 19, BEL);
+}
+
+/* Change the highlight foreground color, ST terminated */
+static void
+vte_sequence_handler_change_highlight_foreground_color_st (VteTerminal *terminal, GValueArray *params)
+{
+	vte_sequence_handler_change_special_color_internal (terminal, params,
+							    VTE_HIGHLIGHT_FG, VTE_DEFAULT_BG, 19, ST);
+}
+
+/* Reset the highlight foreground color */
+static void
+vte_sequence_handler_reset_highlight_foreground_color (VteTerminal *terminal, GValueArray *params)
+{
+	_vte_terminal_set_color_internal(terminal, VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE, NULL);
 }
 
 
