Changes a color definition.
Curses Library (libcurses.a)
#include <curses.h>
init_color( Color, R,
G, B)
register short Color, R, G, B;
The init_color subroutine changes a color definition. A single color is defined by the combination of its red, green, and blue components. The init_color subroutine changes all the occurrences of the color on the screen immediately. If the color is changed successfully, this subroutines returns OK. Otherwise, it returns ERR.
To determine if you can change a terminal's color definitions, see the can_change_color subroutine.
OK | Indicates the color was changed successfully. |
ERR | Indicates the color was not changed. |
To initialize the color definition for color 11 to violet on a terminal that supports at least 12 colors, use:
init_color(11,500,0,500);
The start_color (start_color Subroutine) subroutine.
Curses Overview for Programming and Manipulating Video Attributes in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.