summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/man/curs_color.3x
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/man/curs_color.3x')
-rw-r--r--contrib/ncurses/man/curs_color.3x52
1 files changed, 39 insertions, 13 deletions
diff --git a/contrib/ncurses/man/curs_color.3x b/contrib/ncurses/man/curs_color.3x
index 03cbba6..ccf8cf8 100644
--- a/contrib/ncurses/man/curs_color.3x
+++ b/contrib/ncurses/man/curs_color.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 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 *
@@ -26,13 +26,17 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_color.3x,v 1.10 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: curs_color.3x,v 1.16 2000/07/15 22:57:03 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
@@ -83,13 +87,27 @@ just turned on.
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
+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 is
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
(for the amounts of red, green, and blue components). The value of the first
@@ -160,15 +178,18 @@ the background color used when parts of a window are blanked by erasing or
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
@@ -177,11 +198,16 @@ for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR.
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:
OpenPOWER on IntegriCloud