Query maximum number of colors from terminfo

$TERM doesn't express much information, so, checking whether the $TERM is 256 colors support from terminfo is better