Changes a color-pair definition.
Curses Library (libcurses.a)
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.|
|Pair||Identifies the color-pair number. The value of the Pair parameter must be between 1 and COLORS_PAIRS-1.|
|F||Specifies the foreground color number. This number must be between 0 and COLORS-1.|
|B||Specifies the background color number. This number must be between 0 and COLORS-1.|
To initialize the color definition for color-pair 2 to a black foreground (color 0) with a cyan background (color 3), use:
This routine is part of Base Operating System (BOS) Runtime.
The init_color (init_color Subroutine) subroutine, start_color (start_color Subroutine) subroutine.
Curses Overview for Programming, List of Curses Subroutines, Manipulating Video Attributes in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.