If a terminal supports color, you can use the color manipulation subroutines to include color in your curses program. Before manipulating colors, you should test whether a terminal supports color. To do this, you can use either the has_colors subroutine or the can_change_color subroutine. The can_change_color subroutine also checks to see if a program can change the terminal's color definitions. Neither of these subroutines require an argument.
Once you have determined that the terminal supports color, you must call the start_color subroutine before calling other color subroutines. It is a good practice to call this subroutine right after the initscr subroutine and after a successful color test. The start_color subroutine initializes the eight basic colors and two global variables, COLORS and COLOR_PAIRS. The COLORS global variable defines the maximum number of colors the terminal supports. The COLOR_PAIRS global variable defines the maximum number of color pairs the terminal supports.
Curses Overview for Programming