NCurses and COLOR

The current hot topic on colors is those terminals that can do 256 colors. NCurses can be compiled to handle 256 colors, but out of the box, it's set to do only the standard 16 as covered in the book. So to get all 256 colors you need two things:

The popular xterm, as well as many other terminals, can initialize 256 colors. But note that some terminals, while they can support 256 colors, are not able to change the palette.

To compile NCurses with 256 color support, use this option:

Notes on this option were given to me by Thomas Dickey, NCurses' maintainer:

This option allows encoding of 256 foreground and background colors, e.g., with the xterm-256color or xterm-88color terminfo entries. This requires ABI 6 because it changes the size of cchar_t.

Good luck!