File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -122,10 +122,15 @@ The module :mod:`curses` defines the following functions:
122
122
.. function :: color_pair(pair_number)
123
123
124
124
Return the attribute value for displaying text in the specified color pair.
125
- Only the first 256 color pairs are supported. This
126
- attribute value can be combined with :const: `A_STANDOUT `, :const: `A_REVERSE `,
127
- and the other :const: `!A_\* ` attributes. :func: `pair_number ` is the counterpart
128
- to this function.
125
+ Only the first 256 color pairs are supported. The value returned by
126
+ ``color_pair(n) `` is an attribute mask. It can be combined (using bitwise OR, ``| ``)
127
+ with other style attributes such as :const: `A_BOLD `, :const: `A_REVERSE `,
128
+ :const: `A_UNDERLINE `, etc. Note that :const: `A_COLOR `, :const: `A_ATTRIBUTES `,
129
+ and :const: `A_CHARTEXT ` are extraction masks used with bitwise AND (``& ``) on
130
+ values returned from functions like :meth: `window.inch `. They are not style
131
+ attributes and must not be combined with :func: `color_pair `. :func: `pair_number `
132
+ is the counterpart to this function.
133
+
129
134
130
135
131
136
.. function :: curs_set(visibility)
You can’t perform that action at this time.
0 commit comments