Index: docs/reference/gdk/gdk-sections.txt
===================================================================
RCS file: /cvs/gnome/gtk+/docs/reference/gdk/gdk-sections.txt,v
retrieving revision 1.73
diff -u -p -r1.73 gdk-sections.txt
--- docs/reference/gdk/gdk-sections.txt	19 Sep 2006 16:37:41 -0000	1.73
+++ docs/reference/gdk/gdk-sections.txt	7 Dec 2006 05:01:28 -0000
@@ -385,6 +385,7 @@ gdk_color_alloc
 gdk_color_change
 gdk_color_equal
 gdk_color_hash
+gdk_color_to_string
 
 <SUBSECTION Standard>
 GDK_COLORMAP
Index: gdk/gdkcolor.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkcolor.c,v
retrieving revision 1.47
diff -u -p -r1.47 gdkcolor.c
--- gdk/gdkcolor.c	5 Dec 2005 20:51:18 -0000	1.47
+++ gdk/gdkcolor.c	7 Dec 2006 05:01:29 -0000
@@ -349,6 +349,33 @@ gdk_color_parse (const gchar *spec,
 }
 
 /**
+ * gdk_color_to_string:
+ * @color: a #GdkColor
+ *
+ * Returns a textual specification of @color in the hexadecimal form
+ * <literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>,
+ * <literal>g</literal> and <literal>b</literal> are hex digits
+ * representing the red, green and blue components respectively.
+ *
+ * Return value: a newly-allocated text string
+ *
+ * Since: 2.12
+ **/
+gchar *
+gdk_color_to_string (const GdkColor *color)
+{
+  PangoColor pango_color;
+
+  g_return_val_if_fail (color != NULL, NULL);
+
+  pango_color.red = color->red;
+  pango_color.green = color->green;
+  pango_color.blue = color->blue;
+
+  return pango_color_to_string (&pango_color);
+}
+
+/**
  * gdk_colormap_get_system:
  * 
  * Gets the system's default colormap for the default screen. (See
Index: gdk/gdkcolor.h
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkcolor.h,v
retrieving revision 1.21
diff -u -p -r1.21 gdkcolor.h
--- gdk/gdkcolor.h	22 May 2006 12:58:00 -0000	1.21
+++ gdk/gdkcolor.h	7 Dec 2006 05:01:32 -0000
@@ -127,13 +127,14 @@ void     gdk_colormap_query_color (GdkCo
 
 GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap);
      
-GdkColor *gdk_color_copy  (const GdkColor *color);
-void      gdk_color_free  (GdkColor       *color);
-gboolean  gdk_color_parse (const gchar    *spec,
-			   GdkColor       *color);
-guint     gdk_color_hash  (const GdkColor *colora);
-gboolean  gdk_color_equal (const GdkColor *colora,
-			   const GdkColor *colorb);
+GdkColor *gdk_color_copy      (const GdkColor *color);
+void      gdk_color_free      (GdkColor       *color);
+gboolean  gdk_color_parse     (const gchar    *spec,
+			       GdkColor       *color);
+guint     gdk_color_hash      (const GdkColor *colora);
+gboolean  gdk_color_equal     (const GdkColor *colora,
+			       const GdkColor *colorb);
+gchar *   gdk_color_to_string (const GdkColor *color);
 
 GType     gdk_color_get_type (void) G_GNUC_CONST;
 
