diff --git a/src/gm-color-table.c b/src/gm-color-table.c index 4641cf6..0ff2907 100644 --- a/src/gm-color-table.c +++ b/src/gm-color-table.c @@ -222,6 +222,19 @@ gm_color_table_get(GmColorTable *table, const gchar *name, GdkColor *color) { } } +const gchar * +gm_color_table_get_hex(GmColorTable *table, const gchar *name) { + GmColorTableItem *item; + + item = g_hash_table_lookup(table->priv->colors, name); + + if (item != NULL) { + return item->hex; + } else { + return FALSE; + } +} + void gm_color_table_set_bold(GmColorTable *table, gboolean bold) { if (table->priv->bold != bold) {