.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_color.3x,v 1.10 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: curs_color.3x,v 1.19 2002/02/16 22:38:32 tom Exp $
.TH curs_color 3X ""
.SH NAME
-\fBstart_color\fR, \fBinit_pair\fR,
-\fBinit_color\fR, \fBhas_colors\fR, \fBcan_change_color\fR,
-\fBcolor_content\fR, \fBpair_content\fR - \fBcurses\fR color
-manipulation routines
+\fBstart_color\fR,
+\fBinit_pair\fR,
+\fBinit_color\fR,
+\fBhas_colors\fR,
+\fBcan_change_color\fR,
+\fBcolor_content\fR,
+\fBpair_content\fR,
+\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines
.SH SYNOPSIS
\fB# include <curses.h>\fR
.br
The \fBinit_pair\fR routine changes the definition of a color-pair. It takes
three arguments: the number of the color-pair to be changed, the foreground
-color number, and the background color number. The value of the first argument
-must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. The value of the second and
+color number, and the background color number.
+For portable applications:
+.TP 5
+-
+The value of the first argument
+must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR.
+.TP 5
+-
+The value of the second and
third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired
-to white on black and cannot be changed). If the color-pair was previously
-initialized, the screen is refreshed and all occurrences of that color-pair is
-changed to the new definition.
+to white on black and cannot be changed).
+.PP
+If the color-pair was previously
+initialized, the screen is refreshed and all occurrences of that color-pair
+are changed to the new definition.
+
+As an extension, ncurses allows you to set color pair 0 via
+the \fBassume_default_colors\fR routine, or to specify the use of
+default colors (color number \fB-1\fR) if you first invoke the
+\fBuse_default_colors\fR routine.
The \fBinit_color\fR routine changes the definition of a color. It takes four
arguments: the number of the color to be changed followed by three RGB values
scrolling operations, see \fBcurs_bkgd\fR(3X).
Several caveats apply on 386 and 486 machines with VGA-compatible graphics:
-
+.TP 5
+-
COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with
the \fBA_BOLD\fR attribute.
-
+.TP 5
+-
The A_BLINK attribute should in theory cause the background to go bright. This
often fails to work, and even some cards for which it mostly works (such as the
Paradise and compatibles) do the wrong thing when you try to set a bright
"yellow" background (you get a blinking yellow foreground instead).
-
+.TP 5
+-
Color RGB values are not settable.
.SH PORTABILITY
This implementation satisfies XSI Curses's minimum maximums
The \fBinit_pair\fP routine accepts negative values of foreground
and background color to support the \fBuse_default_colors\fP extension,
but only if that routine has been first invoked.
+.PP
+The assumption that \fBCOLOR_BLACK\fR is the default
+background color for all terminals can be modified using the
+\fBassume_default_colors\fP extension,
+
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_initscr\fR(3X),
\fBcurs_attr\fR(3X),
-\fBdft_fgbg\fR(3X)
+\fBdefault_colors\fR(3X)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables: