TERM_RGBCOLOURS
TERM_256COLOURS|TERM_RGBCOLOURS
term->flags |= TERM_RGBCOLOURS;
term->flags &= ~TERM_RGBCOLOURS;
log_debug("RGBCOLOURS flag is %d", !!(term->flags & TERM_RGBCOLOURS));
if (tty->term->flags & TERM_RGBCOLOURS)
if (tty->term->flags & TERM_RGBCOLOURS)