By default, ncurses6 is configured with --enable-ext-colors enabled. You also need --enable-widec (otherwise, the type cchar_t in which the advanced colors are stored is not used). The configuration script warns about this:
checking if you want to use extended colors... yes configure: WARNING: This option applies only to wide-character library
Assuming you have built a library with extended colors (and wide characters), it is capable of displaying up to 256 colors and up to 32767 color pairs (maximum value in 16-bit value). After that, it depends on the description of the terminal you are using (and the terminal emulator). Most terminal emulators running on X Windows can display 256 colors. Outside of X, it is not clear that there is a majority.
ncurses has fairly accurate descriptions of the terminals for each of them (and no, using TERM=xterm-256color not the answer for each of them, since special keys and other characteristics are usually different from xterm: FAQ Why not just use the TERM set to "xterm "? also applies to xterm-256color ).
Here is a screenshot showing xterm running the ncurses test program (from ncurses-examples ) for wide colors:

source share