Query maximum number of colors from terminfo