Index: libedataserverui/e-categories-dialog.c
===================================================================
--- libedataserverui/e-categories-dialog.c	(revision 7873)
+++ libedataserverui/e-categories-dialog.c	(working copy)
@@ -23,6 +23,7 @@
 
 #include <string.h>
 #include <glib/gi18n-lib.h>
+#include <gtk/gtk.h>
 #include <gtk/gtkbox.h>
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkcellrenderertext.h>
@@ -249,8 +250,8 @@
 
 	do {
 		if (gtk_dialog_run (GTK_DIALOG (prop_dialog->the_dialog)) == GTK_RESPONSE_OK) {
-			const char *category_name, *category_icon;
-			char *correct_category_name;
+			const gchar *category_name;
+			gchar *correct_category_name;
 			GtkTreeIter iter;
 
 			category_name = gtk_entry_get_text (GTK_ENTRY (prop_dialog->category_name));
@@ -269,11 +270,19 @@
 				gtk_widget_destroy (error_dialog);
 				g_free (correct_category_name);
 			} else {
-				/* FIXME: get color */
-				category_icon = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon));
+				const gchar *category_icon = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon));
+				gchar new_category_color[32];
+				GdkColor new_color;
+				guint32 rgb = 0;
 
-				e_categories_add (correct_category_name, NULL, category_icon ? category_icon : NULL, TRUE);
+				gtk_color_button_get_color (prop_dialog->category_color, &new_color);
 
+				rgb = ((new_color.red & 0xFF00) << 8) | (new_color.green & 0xFF00) | ((new_color.blue & 0xFF00) >> 8);
+
+				sprintf (new_category_color, "#%06X", rgb & 0xFFFFFF);
+
+				e_categories_add (correct_category_name, new_category_color, category_icon ? category_icon : NULL, TRUE);
+
 				gtk_list_store_append (
 					GTK_LIST_STORE (gtk_tree_view_get_model (
 								GTK_TREE_VIEW (prop_dialog->parent->priv->categories_list))),
@@ -302,7 +311,8 @@
 	CategoryPropertiesDialog *prop_dialog;
 	GtkTreeIter iter;
 	GtkTreeModel *model;
-	char *category_name;
+	gchar *category_name;
+	GdkColor cur_color;
 
 	dialog = user_data;
 	priv = dialog->priv;
@@ -322,17 +332,30 @@
 	gtk_tree_model_get (model, &iter, 1, &category_name, -1);
 	gtk_entry_set_text (GTK_ENTRY (prop_dialog->category_name), category_name);
 	gtk_widget_set_sensitive (prop_dialog->category_name, FALSE);
-	gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon), 
-				       e_categories_get_icon_file_for (category_name));
 
+	if (e_categories_get_icon_file_for (category_name))
+		gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon), 
+ 				       e_categories_get_icon_file_for (category_name));
+ 
+	if (gdk_color_parse (e_categories_get_color_for (category_name), &cur_color))
+		gtk_color_button_set_color (prop_dialog->category_color, &cur_color) ;
+
 	if (gtk_dialog_run (GTK_DIALOG (prop_dialog->the_dialog)) == GTK_RESPONSE_OK) {
-		const char *category_icon;
+		const gchar *new_category_icon = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon));
+		gchar new_category_color[32];
+		GdkColor new_color;
+		guint32 rgb = 0;
 
-		/* FIXME: get color */
-		category_icon = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon));
+		if (new_category_icon)
+			e_categories_set_icon_file_for (category_name, new_category_icon);
 
-		if (category_icon)
-			e_categories_set_icon_file_for (category_name, category_icon);
+		gtk_color_button_get_color (prop_dialog->category_color, &new_color);
+
+		rgb = ((new_color.red & 0xFF00) << 8) | (new_color.green & 0xFF00) | ((new_color.blue & 0xFF00) >> 8);
+
+		sprintf (new_category_color, "#%06X", rgb & 0xFFFFFF);
+
+		e_categories_set_color_for (category_name, new_category_color);
 	}
 
 	g_free (category_name);
Index: libedataserver/e-categories.c
===================================================================
--- libedataserver/e-categories.c	(revision 7873)
+++ libedataserver/e-categories.c	(working copy)
@@ -336,7 +336,7 @@
 			cat_info->icon_file = g_build_filename (E_DATA_SERVER_IMAGESDIR, cat_info->icon_file, NULL);
 		e_categories_add (
 			gettext (cat_info->category),
-			NULL, cat_info->icon_file, TRUE);
+			cat_info->color, cat_info->icon_file, TRUE);
 		g_free (cat_info->icon_file);
 		cat_info++;
 	}
