X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_color.3x.html;h=9cf3791793c61a09817f73d332d3461949a74655;hp=1ec2985902fd55f0d23e6225e1d703cb268e0c46;hb=2a32bee362db64f5a06b2124976b928ac3faa578;hpb=aabb3a65ee5d88949abe529b5131adedb9cfab84 diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html index 1ec29859..9cf37917 100644 --- a/doc/html/man/curs_color.3x.html +++ b/doc/html/man/curs_color.3x.html @@ -26,7 +26,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_color.3x,v 1.38 2015/05/23 21:36:35 tom Exp @ + * @Id: curs_color.3x,v 1.40 2015/12/05 20:09:42 tom Exp @ --> @@ -45,15 +45,13 @@ - -
+
start_color, init_pair, init_color, has_colors, can_change_color, color_content, pair_content, COLOR_PAIR - curses color manipulation routines --
+
# include <curses.h> int start_color(void); @@ -64,13 +62,12 @@ int color_content(short color, short *r, short *g, short *b); int pair_content(short pair, short *f, short *b); + int COLOR_PAIR(int n); --
+
--
+
curses supports color attributes on terminals with that capability. To use these routines start_color must be called, usually right after initscr. Colors are always @@ -94,8 +91,7 @@ how a given color-pair is currently defined. --
+
The curses library combines these inputs to produce the actual foreground and background colors shown on the screen: @@ -140,8 +136,7 @@ background character. --
+
The start_color routine requires no arguments. It must be called if the programmer wants to use colors, and before any other color manipulation routine is called. It is @@ -274,11 +269,11 @@ through COLORS, inclusive. --
+
In <curses.h> the following macros are defined. These are - the default colors. curses also assumes that COLOR_BLACK - is the default background color for all terminals. + the standard colors (ISO-6429). curses also assumes that + COLOR_BLACK is the default background color for all termi- + nals. COLOR_BLACK COLOR_RED @@ -290,88 +285,84 @@ COLOR_WHITE --
- The routines can_change_color() and has_colors() return +
+ The routines can_change_color() and has_colors() return TRUE or FALSE. All other routines return the integer ERR upon failure and - an OK (SVr4 specifies only "an integer value other than + an OK (SVr4 specifies only "an integer value other than ERR") upon successful completion. - X/Open defines no error conditions. This implementation - will return ERR on attempts to use color values outside + X/Open defines no error conditions. This implementation + will return ERR on attempts to use color values outside the range 0 to COLORS-1 (except for the default colors ex- - tension), or use color pairs outside the range 0 to COL- - OR_PAIRS-1. Color values used in init_color must be in - the range 0 to 1000. An error is returned from all func- - tions if the terminal has not been initialized. An error - is returned from secondary functions such as init_pair if + tension), or use color pairs outside the range 0 to COL- + OR_PAIRS-1. Color values used in init_color must be in + the range 0 to 1000. An error is returned from all func- + tions if the terminal has not been initialized. An error + is returned from secondary functions such as init_pair if start_color was not called. init_color - returns an error if the terminal does not support - this feature, e.g., if the initialize_color capa- + returns an error if the terminal does not support + this feature, e.g., if the initialize_color capa- bility is absent from the terminal description. start_color - returns an error if the color table cannot be al- + returns an error if the color table cannot be al- located. --
- In the ncurses implementation, there is a separate color +
+ In the ncurses implementation, there is a separate color activation flag, color palette, color pairs table, and as- - sociated COLORS and COLOR_PAIRS counts for each screen; - the start_color function only affects the current screen. + sociated COLORS and COLOR_PAIRS counts for each screen; + the start_color function only affects the current screen. The SVr4/XSI interface is not really designed with this in - mind, and historical implementations may use a single + mind, and 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 + 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 curs_bkgd(3x). - Several caveats apply on 386 and 486 machines with VGA- + Several caveats apply on 386 and 486 machines with VGA- compatible graphics: - o COLOR_YELLOW is actually brown. To get yellow, use + o COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with the A_BOLD attribute. o The A_BLINK attribute should in theory cause the back- - ground to go bright. This often fails to work, and + ground 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 + Paradise and compatibles) do the wrong thing when you + try to set a bright "yellow" background (you get a blinking yellow foreground instead). o Color RGB values are not settable. --
- This implementation satisfies XSI Curses's minimum maxi- +
+ This implementation satisfies XSI Curses's minimum maxi- mums for COLORS and COLOR_PAIRS. - The init_pair routine accepts negative values of fore- - ground and background color to support the use_de- - fault_colors extension, but only if that routine has been + The init_pair routine accepts negative values of fore- + ground and background color to support the use_de- + fault_colors extension, but only if that routine has been first invoked. - The assumption that COLOR_BLACK is the default background - color for all terminals can be modified using the as- + The assumption that COLOR_BLACK is the default background + color for all terminals can be modified using the as- sume_default_colors extension. - This implementation checks the pointers, e.g., for the - values returned by color_content and pair_content, and + This implementation checks the pointers, e.g., for the + values returned by color_content and pair_content, and will treat those as optional parameters when null. --
+
curses(3x), curs_initscr(3x), curs_attr(3x), curs_vari- ables(3x), default_colors(3x)