path: root/contrib/ncurses/man/curs_color.3x
diff options
authorPeter Wemm <peter@FreeBSD.org>2000-10-11 07:31:01 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-10-11 07:31:01 +0000
commit18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (patch)
tree9ec00b41242bbe63b83c0ac5316c539466d9f9de /contrib/ncurses/man/curs_color.3x
parent15589c42fa2774d2f8ee650f4f31eb8d3a861316 (diff)
Import ncurses-5.1-20001009 onto the vendor branch
Notes: svn path=/vendor/ncurses/dist/; revision=66963
Diffstat (limited to 'contrib/ncurses/man/curs_color.3x')
1 files changed, 39 insertions, 13 deletions
diff --git a/contrib/ncurses/man/curs_color.3x b/contrib/ncurses/man/curs_color.3x
index 03cbba6349e6..ccf8cf82cfb7 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 ""
-\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
+\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines
\fB# include <curses.h>\fR
@@ -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).
+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.
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.
+The assumption that \fBCOLOR_BLACK\fR is the default
+background color for all terminals can be modified using the
+\fBassume_default_colors\fP extension,
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables: