emulation: Support 16 million colors

https://bugzilla.gnome.org/show_bug.cgi?id=704449