Changes a color-pair definition.
#include <curses.h>
init_pair(Pair, F, B) register short Pair, F, B;
The init_pair subroutine changes a color-pair definition. A color pair is a combination of a foreground and a background color. If you specify a color pair that was previously initialized, curses refreshes the screen and changes all occurrences of that color pair to the new definition. You must call the start_color subroutine before you call this subroutine.
OK | Indicates successful completion. |
ERR | Indicates the subroutine failed. |
To initialize the color definition for color-pair 2 to a black foreground (color 0) with a cyan background (color 3), use:
init_pair(2,COLOR_BLACK, COLOR_CYAN);
This routine is part of Base Operating System (BOS) Runtime.
The init_color subroutine, start_color subroutine.
Curses Overview for Programming, List of Curses Subroutines, Manipulating Video Attributes in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.