This routine gives programmers a way to find the intensity of the red, green, and blue (RGB)
components in a color. It takes the color number as an argument and returns three values
that tell you the amounts of red, green, and blue components in the given color. The argument
must be a legal color value, i.e., 0 through COLORS()-1, inclusive. The values that are returned
are in the range 0 (no component) through 1000 (maximum amount of component), inclusive.
Save the current terminal modes as the “program” (in curses) state for use by the
reset_prog_mode() and reset_shell_mode() functions. This is done automatically by initscr().
Save the current terminal modes as the “shell” (not in curses) state for use by the
reset_prog_mode() and reset_shell_mode() functions. This is done automatically by initscr().
Inserts an ‘milliseconds’ millisecond pause in output. This routine should not be used extensively
because padding characters are used rather than a CPU pause. If no padding character is
specified, this uses napms to perform the delay.
Changes the definition of a color. It takes four arguments: the number of the color to be
changed followed by three RGB values (for the amounts of red, green, and blue components).
The first argument must be a legal color value; default colors are not allowed here.
Each of the last three arguments must be a value in the range 0 through 1000. When init_color
is used, all occurrences of that color on the screen immediately change to the new definition.
Restore the terminal to “program” (in curses) state. This is done
automatically by endwin() and doupdate() after an endwin(), so this would normally not be
called before.
Restore the terminal to “shell” (not in curses) state. This is done automatically by
endwin() and doupdate() after an endwin(), so this would normally not be called before.
Initializes eight basic colors (black, red, green, yellow, blue, magenta, cyan,
and white), and two global variables accessed through COLORS() and COLOR_PAIRS() (respectively defining the
maximum number of colors and color-pairs the terminal is capable of displaying).