Index: kernel/arch/ia32/src/drivers/vesa.c
===================================================================
--- kernel/arch/ia32/src/drivers/vesa.c	(revision f5926ad90e4b54b7902733b37f22567f77daaf2e)
+++ kernel/arch/ia32/src/drivers/vesa.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -38,4 +38,5 @@
 
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <arch/drivers/vesa.h>
 #include <putchar.h>
@@ -68,5 +69,24 @@
 void vesa_init(void)
 {
-	fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_bpp, vesa_scanline, false);
+	unsigned int visual;
+	
+	switch (vesa_bpp) {
+	case 8:
+		visual = VISUAL_INDIRECT_8;
+		break;
+	case 16:
+		visual = VISUAL_RGB_5_6_5;
+		break;
+	case 24:
+		visual = VISUAL_RGB_8_8_8;
+		break;
+	case 32:
+		visual = VISUAL_RGB_0_8_8_8;
+		break;
+	default:
+		panic("Unsupported bits per pixel");
+	}
+	
+	fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_scanline, visual);
 }
 
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision f5926ad90e4b54b7902733b37f22567f77daaf2e)
+++ kernel/arch/mips32/src/mips32.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -54,4 +54,5 @@
 #include <arch/debugger.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <macros.h>
 #include <ddi/device.h>
@@ -123,5 +124,5 @@
 	console_init(device_assign_devno());
 #ifdef CONFIG_FB
-	fb_init(0x12000000, 640, 480, 24, 1920, false); // gxemul framebuffer
+	fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); // gxemul framebuffer
 #endif
 	sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1);
Index: kernel/arch/ppc32/src/ppc32.c
===================================================================
--- kernel/arch/ppc32/src/ppc32.c	(revision f5926ad90e4b54b7902733b37f22567f77daaf2e)
+++ kernel/arch/ppc32/src/ppc32.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -39,4 +39,5 @@
 #include <arch/interrupt.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <userspace.h>
 #include <proc/uarg.h>
@@ -76,5 +77,23 @@
 	if (config.cpu_active == 1) {
 		/* Initialize framebuffer */
-		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false);
+		unsigned int visual;
+		
+		switch (bootinfo.screen.bpp) {
+		case 8:
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			visual = VISUAL_RGB_5_5_5;
+			break;
+		case 24:
+			visual = VISUAL_RGB_8_8_8;
+			break;
+		case 32:
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			panic("Unsupported bits per pixel");
+		}
+		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual);
 		
 		/* Initialize IRQ routing */
Index: kernel/arch/ppc64/src/ppc64.c
===================================================================
--- kernel/arch/ppc64/src/ppc64.c	(revision f5926ad90e4b54b7902733b37f22567f77daaf2e)
+++ kernel/arch/ppc64/src/ppc64.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -38,4 +38,5 @@
 #include <arch/interrupt.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <userspace.h>
 #include <proc/uarg.h>
@@ -69,5 +70,25 @@
 {
 	if (config.cpu_active == 1) {
-		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false);
+		/* Initialize framebuffer */
+		unsigned int visual;
+		
+		switch (bootinfo.screen.bpp) {
+		case 8:
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			visual = VISUAL_RGB_5_5_5;
+			break;
+		case 24:
+			visual = VISUAL_RGB_8_8_8;
+			break;
+		case 32:
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			panic("Unsupported bits per pixel");
+		}
+		fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual);
+		
 	
 		/* Merge all zones to 1 big zone */
Index: kernel/arch/sparc64/src/drivers/scr.c
===================================================================
--- kernel/arch/sparc64/src/drivers/scr.c	(revision f5926ad90e4b54b7902733b37f22567f77daaf2e)
+++ kernel/arch/sparc64/src/drivers/scr.c	(revision 2bc137c2ead5aef4703a85727d96bf8f99c6f418)
@@ -36,4 +36,5 @@
 #include <genarch/ofw/ofw_tree.h>
 #include <genarch/fb/fb.h>
+#include <genarch/fb/visuals.h>
 #include <arch/types.h>
 #include <typedefs.h>
@@ -76,4 +77,5 @@
 	uint32_t fb_linebytes = 0;
 	uint32_t fb_scanline = 0;
+	unsigned int visual;
 
 	prop = ofw_tree_getprop(node, "width");
@@ -116,14 +118,31 @@
 			return;
 		}
-
-		if (fb_depth == 24)
+		
+		switch (fb_depth) {
+		case 8:
+			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_INDIRECT_8;
+			break;
+		case 16:
+			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_RGB_5_6_5;
+			break;
+		case 24:
 			fb_scanline = fb_linebytes * 4;
-		else
+			visual = VISUAL_RGB_8_8_8_0;
+			break;
+		case 32:
 			fb_scanline = fb_linebytes * (fb_depth >> 3);
+			visual = VISUAL_RGB_0_8_8_8;
+			break;
+		default:
+			printf("Unsupported bits per pixel.\n");
+			return;
+		}
 		
 		break;
 	case SCR_FFB:	
-		fb_depth = 32;
 		fb_scanline = 8192;
+		visual = VISUAL_RGB_0_8_8_8;
 
 		ofw_upa_reg_t *reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP];
@@ -138,5 +157,5 @@
 	}
 
-	fb_init(fb_addr, fb_width, fb_height, fb_depth, fb_scanline, true);
+	fb_init(fb_addr, fb_width, fb_height, fb_scanline, visual);
 }
 
