Index: uspace/lib/gfxfont/src/text.c
===================================================================
--- uspace/lib/gfxfont/src/text.c	(revision fe40b67572ac2e5cccf0f269ed3eef05152f67f1)
+++ uspace/lib/gfxfont/src/text.c	(revision d6c4d408b32d32fe8f22cbd847b0ba04ff2f7767)
@@ -36,6 +36,8 @@
 #include <errno.h>
 #include <gfx/bitmap.h>
+#include <gfx/color.h>
 #include <gfx/font.h>
 #include <gfx/glyph.h>
+#include <gfx/render.h>
 #include <gfx/text.h>
 #include <io/pixelmap.h>
@@ -97,9 +99,10 @@
  * @param font Font
  * @param pos Position of top-left corner of text
+ * @param color Text color
  * @param str String
  * @return EOK on success or an error code
  */
 static errno_t gfx_puttext_textmode(gfx_font_t *font, gfx_coord2_t *pos,
-    const char *str)
+    gfx_color_t *color, const char *str)
 {
 	gfx_context_t *gc = font->typeface->gc;
@@ -107,4 +110,5 @@
 	gfx_bitmap_t *bitmap;
 	gfx_bitmap_alloc_t alloc;
+	uint16_t r, g, b;
 	pixelmap_t pmap;
 	gfx_coord_t x;
@@ -116,4 +120,14 @@
 	 * the most efficient way.
 	 */
+
+	gfx_color_get_rgb_i16(color, &r, &g, &b);
+
+	/*
+	 * We are setting the *background* color, the foreground color
+	 * will be set to its complement.
+	 */
+	r = 0xff ^ (r >> 8);
+	g = 0xff ^ (g >> 8);
+	b = 0xff ^ (b >> 8);
 
 	gfx_bitmap_params_init(&params);
@@ -138,5 +152,5 @@
 
 	for (x = 0; x < params.rect.p1.x; x++) {
-		pixel = PIXEL(str[x], 0xff, 0xff, 0xff);
+		pixel = PIXEL(str[x], r, g, b);
 		pixelmap_put_pixel(&pmap, x, 0, pixel);
 	}
@@ -206,5 +220,9 @@
 	/* Text mode */
 	if ((font->finfo->props.flags & gff_text_mode) != 0)
-		return gfx_puttext_textmode(font, &cpos, str);
+		return gfx_puttext_textmode(font, &cpos, fmt->color, str);
+
+	rc = gfx_set_color(font->typeface->gc, fmt->color);
+	if (rc != EOK)
+		return rc;
 
 	cp = str;
