@@ -112,14 +112,15 @@ The module :mod:`curses` defines the following functions:
112112.. function :: color_content(color_number)
113113
114114 Return the intensity of the red, green, and blue (RGB) components in the color
115- *color_number *, which must be between ``0 `` and :const: ` COLORS `. Return a 3-tuple,
115+ *color_number *, which must be between ``0 `` and `` COLORS - 1 ` `. Return a 3-tuple,
116116 containing the R,G,B values for the given color, which will be between
117117 ``0 `` (no component) and ``1000 `` (maximum amount of component).
118118
119119
120- .. function :: color_pair(color_number )
120+ .. function :: color_pair(pair_number )
121121
122- Return the attribute value for displaying text in the specified color. This
122+ Return the attribute value for displaying text in the specified color pair.
123+ Only the first 256 color pairs are supported. This
123124 attribute value can be combined with :const: `A_STANDOUT `, :const: `A_REVERSE `,
124125 and the other :const: `A_\* ` attributes. :func: `pair_number ` is the counterpart
125126 to this function.
@@ -287,7 +288,7 @@ The module :mod:`curses` defines the following functions:
287288 Change the definition of a color, taking the number of the color to be changed
288289 followed by three RGB values (for the amounts of red, green, and blue
289290 components). The value of *color_number * must be between ``0 `` and
290- :const: `COLORS `. Each of *r *, *g *, *b *, must be a value between ``0 `` and
291+ `COLORS - 1 `. Each of *r *, *g *, *b *, must be a value between ``0 `` and
291292 ``1000 ``. When :func: `init_color ` is used, all occurrences of that color on the
292293 screen immediately change to the new definition. This function is a no-op on
293294 most terminals; it is active only if :func: `can_change_color ` returns ``True ``.
@@ -300,7 +301,8 @@ The module :mod:`curses` defines the following functions:
300301 color number. The value of *pair_number * must be between ``1 `` and
301302 ``COLOR_PAIRS - 1 `` (the ``0 `` color pair is wired to white on black and cannot
302303 be changed). The value of *fg * and *bg * arguments must be between ``0 `` and
303- :const: `COLORS `. If the color-pair was previously initialized, the screen is
304+ ``COLORS - 1 ``, or, after calling :func: `use_default_colors `, ``-1 ``.
305+ If the color-pair was previously initialized, the screen is
304306 refreshed and all occurrences of that color-pair are changed to the new
305307 definition.
306308
@@ -450,7 +452,7 @@ The module :mod:`curses` defines the following functions:
450452.. function :: pair_content(pair_number)
451453
452454 Return a tuple ``(fg, bg) `` containing the colors for the requested color pair.
453- The value of *pair_number * must be between ``1 `` and ``COLOR_PAIRS - 1 ``.
455+ The value of *pair_number * must be between ``0 `` and ``COLOR_PAIRS - 1 ``.
454456
455457
456458.. function :: pair_number(attr)
0 commit comments