- method. The numeric capabilities <B>colors</B> and <B>pairs</B> specify
- the maximum numbers of colors and color-pairs that can be
- displayed simultaneously. The <B>op</B> (original pair) string
- resets foreground and background colors to their default
- values for the terminal. The <B>oc</B> string resets all colors
- or color-pairs to their default values for the terminal.
- Some terminals (including many PC terminal emulators)
- erase screen areas with the current background color
- rather than the power-up default background; these should
- have the boolean capability <B>bce</B>.
-
- To change the current foreground or background color on a
- Tektronix-type terminal, use <B>setaf</B> (set ANSI foreground)
- and <B>setab</B> (set ANSI background) or <B>setf</B> (set foreground)
- and <B>setb</B> (set background). These take one parameter, the
- color number. The SVr4 documentation describes only
- <B>setaf</B>/<B>setab</B>; the XPG4 draft says that "If the terminal
- supports ANSI escape sequences to set background and fore-
- ground, they should be coded as <B>setaf</B> and <B>setab</B>, respec-
- tively. If the terminal supports other escape sequences
- to set background and foreground, they should be coded as
- <B>setf</B> and <B>setb</B>, respectively. The <I>vidputs()</I> function and
- the refresh functions use <B>setaf</B> and <B>setab</B> if they are
- defined."
-
- The <B>setaf</B>/<B>setab</B> and <B>setf</B>/<B>setb</B> capabilities take a single
- numeric argument each. Argument values 0-7 are portably
- defined as follows (the middle column is the symbolic
- #define available in the header for the <B>curses</B> or <B>ncurses</B>
- libraries). The terminal hardware is free to map these as
- it likes, but the RGB values indicate normal locations in
- color space.
-
- <B>Color</B> <B>#define</B> <B>Value</B> <B>RGB</B>
- black <B>COLOR_BLACK</B> 0 0, 0, 0
- red <B>COLOR_RED</B> 1 max,0,0
- green <B>COLOR_GREEN</B> 2 0,max,0
- yellow <B>COLOR_YELLOW</B> 3 max,max,0
- blue <B>COLOR_BLUE</B> 4 0,0,max
- magenta <B>COLOR_MAGENTA</B> 5 max,0,max
- cyan <B>COLOR_CYAN</B> 6 0,max,max
- white <B>COLOR_WHITE</B> 7 max,max,max
-
- On an HP-like terminal, use <B>scp</B> with a color-pair number
+ method. The numeric capabilities <STRONG>colors</STRONG> and <STRONG>pairs</STRONG> specify
+ the maximum numbers of colors and color-pairs that can be
+ displayed simultaneously. The <STRONG>op</STRONG> (original pair) string
+ resets foreground and background colors to their default
+ values for the terminal. The <STRONG>oc</STRONG> string resets all colors
+ or color-pairs to their default values for the terminal.
+ Some terminals (including many PC terminal emulators)
+ erase screen areas with the current background color
+ rather than the power-up default background; these should
+ have the boolean capability <STRONG>bce</STRONG>.
+
+ While the curses library works with <EM>color</EM> <EM>pairs</EM> (reflect-
+ ing the inability of some devices to set foreground and
+ background colors independently), there are separate capa-
+ bilities for setting these features:
+
+ <STRONG>o</STRONG> To change the current foreground or background color
+ on a Tektronix-type terminal, use <STRONG>setaf</STRONG> (set ANSI
+ foreground) and <STRONG>setab</STRONG> (set ANSI background) or <STRONG>setf</STRONG>
+ (set foreground) and <STRONG>setb</STRONG> (set background). These
+ take one parameter, the color number. The SVr4 docu-
+ mentation describes only <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>; the XPG4 draft
+ says that "If the terminal supports ANSI escape
+ sequences to set background and foreground, they
+ should be coded as <STRONG>setaf</STRONG> and <STRONG>setab</STRONG>, respectively.
+
+ <STRONG>o</STRONG> If the terminal supports other escape sequences to set
+ background and foreground, they should be coded as
+ <STRONG>setf</STRONG> and <STRONG>setb</STRONG>, respectively. The <STRONG>vidputs</STRONG> and the
+ <STRONG><A HREF="curs_refresh.3x.html">refresh(3x)</A></STRONG> functions use the <STRONG>setaf</STRONG> and <STRONG>setab</STRONG> capabil-
+ ities if they are defined.
+
+ The <STRONG>setaf</STRONG>/<STRONG>setab</STRONG> and <STRONG>setf</STRONG>/<STRONG>setb</STRONG> capabilities take a single
+ numeric argument each. Argument values 0-7 of <STRONG>setaf</STRONG>/<STRONG>setab</STRONG>
+ are portably defined as follows (the middle column is the
+ symbolic #define available in the header for the <STRONG>curses</STRONG> or
+ <STRONG>ncurses</STRONG> libraries). The terminal hardware is free to map
+ these as it likes, but the RGB values indicate normal
+ locations in color space.
+
+ <STRONG>Color</STRONG> <STRONG>#define</STRONG> <STRONG>Value</STRONG> <STRONG>RGB</STRONG>
+ black <STRONG>COLOR_BLACK</STRONG> 0 0, 0, 0
+ red <STRONG>COLOR_RED</STRONG> 1 max,0,0
+ green <STRONG>COLOR_GREEN</STRONG> 2 0,max,0
+ yellow <STRONG>COLOR_YELLOW</STRONG> 3 max,max,0
+ blue <STRONG>COLOR_BLUE</STRONG> 4 0,0,max
+ magenta <STRONG>COLOR_MAGENTA</STRONG> 5 max,0,max
+ cyan <STRONG>COLOR_CYAN</STRONG> 6 0,max,max
+ white <STRONG>COLOR_WHITE</STRONG> 7 max,max,max
+
+ The argument values of <STRONG>setf</STRONG>/<STRONG>setb</STRONG> historically correspond
+ to a different mapping, i.e.,
+
+ <STRONG>Color</STRONG> <STRONG>#define</STRONG> <STRONG>Value</STRONG> <STRONG>RGB</STRONG>
+ black <STRONG>COLOR_BLACK</STRONG> 0 0, 0, 0
+ blue <STRONG>COLOR_BLUE</STRONG> 1 0,0,max
+ green <STRONG>COLOR_GREEN</STRONG> 2 0,max,0
+ cyan <STRONG>COLOR_CYAN</STRONG> 3 0,max,max
+ red <STRONG>COLOR_RED</STRONG> 4 max,0,0
+ magenta <STRONG>COLOR_MAGENTA</STRONG> 5 max,0,max
+ yellow <STRONG>COLOR_YELLOW</STRONG> 6 max,max,0
+ white <STRONG>COLOR_WHITE</STRONG> 7 max,max,max
+
+ It is important to not confuse the two sets of color capa-
+ bilities; otherwise red/blue will be interchanged on the
+ display.
+
+ On an HP-like terminal, use <STRONG>scp</STRONG> with a color-pair number