Added support for 8 and 16 colour terminals.