X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fcurs_color.3x;h=ccf8cf82cfb720c2be57babcf7a9eee4b41f2249;hp=b228ebaacf2b01f4ce61fcde12a7240c471d5ad9;hb=c633e5103a29a38532cf1925257b91cea33fd090;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c diff --git a/man/curs_color.3x b/man/curs_color.3x index b228ebaa..ccf8cf82 100644 --- a/man/curs_color.3x +++ b/man/curs_color.3x @@ -1,10 +1,42 @@ -.\" $Id: curs_color.3x,v 1.8 1997/01/19 02:50:30 tom Exp $ +.\"*************************************************************************** +.\" 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 * +.\" "Software"), to deal in the Software without restriction, including * +.\" without limitation the rights to use, copy, modify, merge, publish, * +.\" distribute, distribute with modifications, sublicense, and/or sell * +.\" copies of the Software, and to permit persons to whom the Software is * +.\" furnished to do so, subject to the following conditions: * +.\" * +.\" The above copyright notice and this permission notice shall be included * +.\" in all copies or substantial portions of the Software. * +.\" * +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * +.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * +.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * +.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * +.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $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 \fR .br @@ -55,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 @@ -129,18 +175,21 @@ historical implementations may use a single shared color palette. Note that setting an implicit background color via a color pair affects only character cells that a character write operation explicitly touches. To change the background color used when parts of a window are blanked by erasing or -scrolling operations, see \fBcurs_bkgd\fR(3x). +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 @@ -149,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: