fix ansi escape sequences, reset 24bit flag properly, add support for %n in themes and extended colours; fix missing include; reorder cubes; fix mirc colours