Index: uspace/srv/fb/fb.c
===================================================================
--- uspace/srv/fb/fb.c	(revision 7447572cfbe25a6a44b66c23f9e52aeecfc22df1)
+++ uspace/srv/fb/fb.c	(revision 4a62ec952c0abab08fd690a77afe56cac4aee95f)
@@ -186,4 +186,5 @@
 };
 
+static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a);
 static int rgb_from_style(attr_rgb_t *rgb, int style);
 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color,
@@ -878,20 +879,11 @@
 		uint8_t glyph = bbp->glyph;
 
-		if (glyph != data[i].character) {
-			bbp->glyph = data[i].character;
-			a = &data[i].attrs;
-
-			switch (a->t) {
-			case at_style:
-				rgb_from_style(&rgb, a->a.s.style);
-				break;
-			case at_idx:
-				rgb_from_idx(&rgb, a->a.i.fg_color,
-				    a->a.i.bg_color, a->a.i.flags);
-				break;
-			case at_rgb:
-				rgb = a->a.r;
-				break;
-			}
+		a = &data[i].attrs;
+		rgb_from_attr(&rgb, a);
+
+		if (glyph != data[i].character ||
+		    rgb.fg_color != bbp->fg_color ||
+		    rgb.bg_color != bbp->bg_color) {
+			bbp->glyph = data[i].character;	
 
 			bbp->fg_color = rgb.fg_color;
@@ -1443,4 +1435,25 @@
 
 	return EOK;
+}
+
+static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a)
+{
+	int rc;
+
+	switch (a->t) {
+	case at_style:
+		rc = rgb_from_style(rgb, a->a.s.style);
+		break;
+	case at_idx:
+		rc = rgb_from_idx(rgb, a->a.i.fg_color,
+		    a->a.i.bg_color, a->a.i.flags);
+		break;
+	case at_rgb:
+		*rgb = a->a.r;
+		rc = EOK;
+		break;
+	}
+
+	return rc;
 }
 
