Hi,
According to [1], 24-bit terminals have become a de facto standard. However, it seems that 24-bit terminals can't advertise this capability easily.
I suggest that terminfo database is extended with a generic xterm-24bit entry, which has all the capabilities of xterm-256color and two capabilities for changing non-indexed colors:
setrgbf=\E[38;2;%p1%d;%p2%d;%p3%dm
setrgbb=\E[48;2;%p1%d;%p2%d;%p3%dm
Pretty much all 24-bit terminals listed in [1] support three rgb values separated by semicolons.
The parameter range could be implicitly 0-255. Alternatively a separate capability could be created to tell how many shades each rgb component supports:
setrgbn#256
I know that this has been previously discussed in [2], but I think the biggest problem in that discussion was trying to preserve compability with indexed color modes. I think that the non-indexed capabilities setrgbf, setrgbb and setrgbn should be completely separate from indexed capabilities colors, setab and setaf.