+ The <STRONG>color_content</STRONG> routine gives programmers a way to find
+ the intensity of the red, green, and blue (RGB) components
+ in a color. It requires four arguments: the color number,
+ and three addresses of <STRONG>short</STRONG>s for storing the information
+ about the amounts of red, green, and blue components in
+ the given color. The first argument must be a legal color
+ value, i.e., <STRONG>0</STRONG> through <STRONG>COLORS-1</STRONG>, inclusive. The values
+ that are stored at the addresses pointed to by the last
+ three arguments are in the range <STRONG>0</STRONG> (no component) through
+ <STRONG>1000</STRONG> (maximum amount of component), inclusive.
+
+ The <STRONG>pair_content</STRONG> routine allows programmers to find out
+ what colors a given color-pair consists of. It requires
+ three arguments: the color-pair number, and two addresses
+ of <STRONG>short</STRONG>s for storing the foreground and the background
+ color numbers. The first argument must be a legal color
+ value, i.e., in the range <STRONG>1</STRONG> through <STRONG>COLOR_PAIRS-1</STRONG>, inclu-
+ sive. The values that are stored at the addresses pointed
+ to by the second and third arguments are in the range <STRONG>0</STRONG>
+ through <STRONG>COLORS</STRONG>, inclusive.
+
+ <STRONG>PAIR_NUMBER(</STRONG><EM>attrs</EM>) extracts the color value from its <EM>attrs</EM>
+ parameter and returns it as a color pair number. Its in-
+ verse <STRONG>COLOR_PAIR(</STRONG><EM>n</EM><STRONG>)</STRONG> converts a color pair number to an at-
+ tribute. Attributes can hold color pairs in the range 0
+ to 255. If you need a color pair larger than that, you
+ must use functions such as <STRONG>attr_set</STRONG> (which pass the color
+ pair as a separate parameter) rather than the legacy func-
+ tions such as <STRONG>attrset</STRONG>.
+
+
+</PRE><H3><a name="h3-Colors">Colors</a></H3><PRE>
+ In <STRONG><curses.h></STRONG> the following macros are defined. These are
+ the standard colors (ISO-6429). <STRONG>curses</STRONG> also assumes that
+ <STRONG>COLOR_BLACK</STRONG> is the default background color for all termi-
+ nals.
+
+ <STRONG>COLOR_BLACK</STRONG>
+ <STRONG>COLOR_RED</STRONG>
+ <STRONG>COLOR_GREEN</STRONG>
+ <STRONG>COLOR_YELLOW</STRONG>
+ <STRONG>COLOR_BLUE</STRONG>
+ <STRONG>COLOR_MAGENTA</STRONG>
+ <STRONG>COLOR_CYAN</STRONG>
+ <STRONG>COLOR_WHITE</STRONG>
+
+
+</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
+ The routines <STRONG>can_change_color()</STRONG> and <STRONG>has_colors()</STRONG> return
+ <STRONG>TRUE</STRONG> or <STRONG>FALSE</STRONG>.
+
+ All other routines return the integer <STRONG>ERR</STRONG> upon failure and
+ an <STRONG>OK</STRONG> (SVr4 specifies only "an integer value other than
+ <STRONG>ERR</STRONG>") upon successful completion.
+
+ X/Open defines no error conditions. This implementation
+ will return <STRONG>ERR</STRONG> on attempts to use color values outside
+ the range <STRONG>0</STRONG> to COLORS-1 (except for the default colors ex-
+ tension), or use color pairs outside the range <STRONG>0</STRONG> to <STRONG>COL-</STRONG>
+ <STRONG>OR_PAIRS-1</STRONG>. Color values used in <STRONG>init_color</STRONG> must be in
+ the range <STRONG>0</STRONG> to <STRONG>1000</STRONG>. An error is returned from all func-
+ tions if the terminal has not been initialized. An error
+ is returned from secondary functions such as <STRONG>init_pair</STRONG> if
+ <STRONG>start_color</STRONG> was not called.
+
+ <STRONG>init_color</STRONG>
+ returns an error if the terminal does not support
+ this feature, e.g., if the <EM>initialize</EM><STRONG>_</STRONG><EM>color</EM> capa-
+ bility is absent from the terminal description.
+
+ <STRONG>start_color</STRONG>
+ returns an error if the color table cannot be al-
+ located.
+
+
+</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
+ In the <EM>ncurses</EM> 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 <STRONG>start_color</STRONG> 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
+ shared color palette.