diff --git a/src/caps.c b/src/caps.c
index d9f52a3..f5e6511 100644
--- a/src/caps.c
+++ b/src/caps.c
@@ -530,16 +530,27 @@ struct _vte_capability_string _vte_xterm_capability_strings[] = {
 	{OSC "11;%s" BEL, "change-background-colors", 0},
 	{OSC "12;%s" BEL, "change-cursor-colors", 0},
 	{OSC "13;%s" BEL, "change-mouse-cursor-foreground-colors", 0},
-	{OSC "14;%s" BEL, "change-mouse-cursor-foreground-colors", 0},
-	{OSC "15;%s" BEL, "change-tek-background-colors", 0},
+	{OSC "14;%s" BEL, "change-mouse-cursor-background-colors", 0},
+	{OSC "15;%s" BEL, "change-tek-foreground-colors", 0},
 	{OSC "16;%s" BEL, "change-tek-background-colors", 0},
-	{OSC "17;%s" BEL, "change-highlight-colors", 0},
+	{OSC "17;%s" BEL, "change-highlight-background-colors", 0},
+	{OSC "18;%s" BEL, "change-tek-cursor-colors", 0},
+	{OSC "19;%s" BEL, "change-highlight-foreground-colors", 0},
 	{OSC "46;%s" BEL, "change-logfile", 0},
 	{OSC "50;#%d" BEL, "change-font-number", 0},
 	{OSC "50;%s" BEL, "change-font-name", 0},
 	{OSC "104" BEL, "reset-color", 0},
 	{OSC "104;%m" BEL, "reset-color", 0},
+	{OSC "110" BEL, "reset-foreground-colors", 0},
+	{OSC "111" BEL, "reset-background-colors", 0},
 	{OSC "112" BEL, "reset-cursor-colors", 0},
+	{OSC "113" BEL, "reset-mouse-cursor-foreground-colors", 0},
+	{OSC "114" BEL, "reset-mouse-cursor-background-colors", 0},
+	{OSC "115" BEL, "reset-tek-foreground-colors", 0},
+	{OSC "116" BEL, "reset-tek-background-colors", 0},
+	{OSC "117" BEL, "reset-highlight-background-colors", 0},
+	{OSC "118" BEL, "reset-tek-cursor-colors", 0},
+	{OSC "119" BEL, "reset-highlight-foreground-colors", 0},
 
 	/* Set text parameters, ST-terminated versions. */
 	{OSC ";%s" ST, "set-icon-and-window-title", 0}, /* undocumented default */
@@ -554,16 +565,27 @@ struct _vte_capability_string _vte_xterm_capability_strings[] = {
 	{OSC "11;%s" ST, "change-background-colors", 0},
 	{OSC "12;%s" ST, "change-cursor-colors", 0},
 	{OSC "13;%s" ST, "change-mouse-cursor-foreground-colors", 0},
-	{OSC "14;%s" ST, "change-mouse-cursor-foreground-colors", 0},
-	{OSC "15;%s" ST, "change-tek-background-colors", 0},
+	{OSC "14;%s" ST, "change-mouse-cursor-background-colors", 0},
+	{OSC "15;%s" ST, "change-tek-foreground-colors", 0},
 	{OSC "16;%s" ST, "change-tek-background-colors", 0},
-	{OSC "17;%s" ST, "change-highlight-colors", 0},
+	{OSC "17;%s" ST, "change-highlight-background-colors", 0},
+	{OSC "18;%s" ST, "change-tek-cursor-colors", 0},
+	{OSC "19;%s" ST, "change-highlight-foreground-colors", 0},
 	{OSC "46;%s" ST, "change-logfile", 0},
 	{OSC "50;#%d" ST, "change-font-number", 0},
 	{OSC "50;%s" ST, "change-font-name", 0},
 	{OSC "104" ST, "reset-color", 0},
 	{OSC "104;%m" ST, "reset-color", 0},
+	{OSC "110" ST, "reset-foreground-colors", 0},
+	{OSC "111" ST, "reset-background-colors", 0},
 	{OSC "112" ST, "reset-cursor-colors", 0},
+	{OSC "113" ST, "reset-mouse-cursor-foreground-colors", 0},
+	{OSC "114" ST, "reset-mouse-cursor-background-colors", 0},
+	{OSC "115" ST, "reset-tek-foreground-colors", 0},
+	{OSC "116" ST, "reset-tek-background-colors", 0},
+	{OSC "117" ST, "reset-highlight-background-colors", 0},
+	{OSC "118" ST, "reset-tek-cursor-colors", 0},
+	{OSC "119" ST, "reset-highlight-foreground-colors", 0},
 
 	/* These may be bogus, I can't find docs for them anywhere (#104154). */
 	{OSC "21;%s" BEL, "set-text-property-21", 0},
diff --git a/src/osc b/src/osc
index 1dbff5f..c7f095c 100755
--- a/src/osc
+++ b/src/osc
@@ -11,9 +11,15 @@ if [ "$#" -eq 0 ] ; then
 	echo "	4 'index;color'	change color"
 	echo "	6 'uri'		change current file uri"
 	echo "	7 'uri'		change current directory uri"
+	echo "	10 'color'	change foreground color"
+	echo "	11 'color'	change background color"
 	echo "	12 'color'	change cursor color"
+	echo "	17 'color'	change highlight background color"
 	echo "	104 'index'	reset color (or all colors)"
+	echo "	110		reset foreground color"
+	echo "	111		reset background color"
 	echo "	112		reset cursor color"
+	echo "	117		reset highlight background color"
 	exit
 fi
 args=
diff --git a/src/vteseq-n.gperf b/src/vteseq-n.gperf
index c359a80..fb5b151 100644
--- a/src/vteseq-n.gperf
+++ b/src/vteseq-n.gperf
@@ -96,7 +96,10 @@ struct vteseq_n_struct {
 #"double-height-top-half", VTE_SEQUENCE_HANDLER_NULL
 "line-position-absolute", VTE_SEQUENCE_HANDLER(vte_sequence_handler_line_position_absolute)
 "return-terminal-status", VTE_SEQUENCE_HANDLER(vte_sequence_handler_return_terminal_status)
-#"change-highlight-colors", VTE_SEQUENCE_HANDLER_NULL
+"change-highlight-background-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_highlight_background_color)
+"reset-highlight-background-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_reset_highlight_background_color)
+#"change-highlight-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
+#"reset-highlight-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
 #"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
@@ -106,8 +109,10 @@ struct vteseq_n_struct {
 #"ansi-conformance-level-1", VTE_SEQUENCE_HANDLER_NULL
 #"ansi-conformance-level-2", VTE_SEQUENCE_HANDLER_NULL
 #"ansi-conformance-level-3", VTE_SEQUENCE_HANDLER_NULL
-#"change-background-colors", VTE_SEQUENCE_HANDLER_NULL
-#"change-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
+"change-background-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_background_color)
+"reset-background-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_reset_background_color)
+"change-foreground-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_change_foreground_color)
+"reset-foreground-colors", VTE_SEQUENCE_HANDLER(vte_sequence_handler_reset_foreground_color)
 "dec-device-status-report", VTE_SEQUENCE_HANDLER(vte_sequence_handler_dec_device_status_report)
 #"enable-locator-reporting", VTE_SEQUENCE_HANDLER_NULL
 #"request-locator-position", VTE_SEQUENCE_HANDLER_NULL
@@ -120,7 +125,11 @@ struct vteseq_n_struct {
 "request-terminal-parameters", VTE_SEQUENCE_HANDLER(vte_sequence_handler_request_terminal_parameters)
 #"select-character-protection", VTE_SEQUENCE_HANDLER_NULL
 #"change-tek-background-colors", VTE_SEQUENCE_HANDLER_NULL
+#"reset-tek-background-colors", VTE_SEQUENCE_HANDLER_NULL
 #"change-tek-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
+#"reset-tek-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
+#"change-tek-cursor-colors", VTE_SEQUENCE_HANDLER_NULL
+#"reset-tek-cursor-colors", VTE_SEQUENCE_HANDLER_NULL
 #"invoke-g1-character-set-as-gr", VTE_SEQUENCE_HANDLER_NULL
 #"invoke-g2-character-set-as-gr", VTE_SEQUENCE_HANDLER_NULL
 #"invoke-g3-character-set-as-gr", VTE_SEQUENCE_HANDLER_NULL
@@ -130,6 +139,8 @@ struct vteseq_n_struct {
 "horizontal-and-vertical-position", VTE_SEQUENCE_HANDLER(vte_sequence_handler_horizontal_and_vertical_position)
 "send-secondary-device-attributes", VTE_SEQUENCE_HANDLER(vte_sequence_handler_send_secondary_device_attributes)
 #"change-mouse-cursor-background-colors", VTE_SEQUENCE_HANDLER_NULL
+#"reset-mouse-cursor-background-colors", VTE_SEQUENCE_HANDLER_NULL
 #"change-mouse-cursor-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
+#"reset-mouse-cursor-foreground-colors", VTE_SEQUENCE_HANDLER_NULL
 "set-current-directory-uri", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_directory_uri)
 "set-current-file-uri", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_file_uri)
diff --git a/src/vteseq.c b/src/vteseq.c
index bdd186b..440fb74 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -3529,6 +3529,90 @@ vte_sequence_handler_window_manipulation (VteTerminal *terminal, GValueArray *pa
 	}
 }
 
+/* Change the default foreground cursor */
+static void
+vte_sequence_handler_change_foreground_color (VteTerminal *terminal, GValueArray *params)
+{
+	gchar *name = NULL;
+	GValue *value;
+	GdkColor color;
+
+	if (params != NULL && params->n_values > 0) {
+		value = g_value_array_get_nth (params, 0);
+
+		if (G_VALUE_HOLDS_STRING (value))
+			name = g_value_dup_string (value);
+		else if (G_VALUE_HOLDS_POINTER (value))
+			name = vte_ucs4_to_utf8 (terminal, g_value_get_pointer (value));
+
+		if (! name)
+			return;
+
+		if (vte_parse_color (name, &color))
+			_vte_terminal_set_color_internal(terminal, VTE_DEF_FG, VTE_COLOR_SOURCE_ESCAPE, &color);
+		else if (strcmp (name, "?") == 0) {
+			gchar buf[128];
+			PangoColor *c = _vte_terminal_get_color(terminal, VTE_DEF_FG);
+			g_assert(c != NULL);
+			g_snprintf (buf, sizeof (buf),
+				    _VTE_CAP_OSC "10;rgb:%04x/%04x/%04x" BEL,
+				    c->red, c->green, c->blue);
+			vte_terminal_feed_child (terminal, buf, -1);
+		}
+
+		g_free (name);
+	}
+}
+
+/* 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);
+}
+
+/* Change the default background cursor */
+static void
+vte_sequence_handler_change_background_color (VteTerminal *terminal, GValueArray *params)
+{
+	gchar *name = NULL;
+	GValue *value;
+	GdkColor color;
+
+	if (params != NULL && params->n_values > 0) {
+		value = g_value_array_get_nth (params, 0);
+
+		if (G_VALUE_HOLDS_STRING (value))
+			name = g_value_dup_string (value);
+		else if (G_VALUE_HOLDS_POINTER (value))
+			name = vte_ucs4_to_utf8 (terminal, g_value_get_pointer (value));
+
+		if (! name)
+			return;
+
+		if (vte_parse_color (name, &color))
+			_vte_terminal_set_color_internal(terminal, VTE_DEF_BG, VTE_COLOR_SOURCE_ESCAPE, &color);
+		else if (strcmp (name, "?") == 0) {
+			gchar buf[128];
+			PangoColor *c = _vte_terminal_get_color(terminal, VTE_DEF_BG);
+			g_assert(c != NULL);
+			g_snprintf (buf, sizeof (buf),
+				    _VTE_CAP_OSC "11;rgb:%04x/%04x/%04x" BEL,
+				    c->red, c->green, c->blue);
+			vte_terminal_feed_child (terminal, buf, -1);
+		}
+
+		g_free (name);
+	}
+}
+
+/* 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);
+}
+
 /* Change the color of the cursor */
 static void
 vte_sequence_handler_change_cursor_color (VteTerminal *terminal, GValueArray *params)
@@ -3573,6 +3657,50 @@ vte_sequence_handler_reset_cursor_color (VteTerminal *terminal, GValueArray *par
 	_vte_terminal_set_color_internal(terminal, VTE_CUR_BG, VTE_COLOR_SOURCE_ESCAPE, NULL);
 }
 
+/* Change the highlight background color */
+static void
+vte_sequence_handler_change_highlight_background_color (VteTerminal *terminal, GValueArray *params)
+{
+	gchar *name = NULL;
+	GValue *value;
+	GdkColor color;
+
+	if (params != NULL && params->n_values > 0) {
+		value = g_value_array_get_nth (params, 0);
+
+		if (G_VALUE_HOLDS_STRING (value))
+			name = g_value_dup_string (value);
+		else if (G_VALUE_HOLDS_POINTER (value))
+			name = vte_ucs4_to_utf8 (terminal, g_value_get_pointer (value));
+
+		if (! name)
+			return;
+
+		if (vte_parse_color (name, &color))
+			_vte_terminal_set_color_internal(terminal, VTE_DEF_HL, VTE_COLOR_SOURCE_ESCAPE, &color);
+		else if (strcmp (name, "?") == 0) {
+			gchar buf[128];
+			PangoColor *c = _vte_terminal_get_color(terminal, VTE_DEF_HL);
+			if (c == NULL)
+				c = _vte_terminal_get_color(terminal, VTE_DEF_FG);
+			g_assert(c != NULL);
+			g_snprintf (buf, sizeof (buf),
+				    _VTE_CAP_OSC "17;rgb:%04x/%04x/%04x" BEL,
+				    c->red, c->green, c->blue);
+			vte_terminal_feed_child (terminal, buf, -1);
+		}
+
+		g_free (name);
+	}
+}
+
+/* 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);
+}
+
 
 /* Lookup tables */
 
