@@ -112,14 +112,15 @@ The module :mod:`curses` defines the following functions:
112
112
.. function :: color_content(color_number)
113
113
114
114
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,
116
116
containing the R,G,B values for the given color, which will be between
117
117
``0 `` (no component) and ``1000 `` (maximum amount of component).
118
118
119
119
120
- .. function :: color_pair(color_number )
120
+ .. function :: color_pair(pair_number )
121
121
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
123
124
attribute value can be combined with :const: `A_STANDOUT `, :const: `A_REVERSE `,
124
125
and the other :const: `A_\* ` attributes. :func: `pair_number ` is the counterpart
125
126
to this function.
@@ -287,7 +288,7 @@ The module :mod:`curses` defines the following functions:
287
288
Change the definition of a color, taking the number of the color to be changed
288
289
followed by three RGB values (for the amounts of red, green, and blue
289
290
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
291
292
``1000 ``. When :func: `init_color ` is used, all occurrences of that color on the
292
293
screen immediately change to the new definition. This function is a no-op on
293
294
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:
300
301
color number. The value of *pair_number * must be between ``1 `` and
301
302
``COLOR_PAIRS - 1 `` (the ``0 `` color pair is wired to white on black and cannot
302
303
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
304
306
refreshed and all occurrences of that color-pair are changed to the new
305
307
definition.
306
308
@@ -450,7 +452,7 @@ The module :mod:`curses` defines the following functions:
450
452
.. function :: pair_content(pair_number)
451
453
452
454
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 ``.
454
456
455
457
456
458
.. function :: pair_number(attr)
0 commit comments