On this page
curses.color_pair
Prev: curses.color_content | Up: curses | Next: curses.curs_set
Rel: curses.assume_default_colors, curses.baudrate, curses.beep, curses.can_change_color
Ref: docs.python.org — curses.color_pair
Tags: #public #python3 #stdlib #curses
Import
import curses
from curses import color_pair
Signature & Overview
curses.color_pair(pair_number, /)
Return the attribute value for displaying text in the specified color.
Usage
import curses
# Converts a pair number (registered via init_pair) into a curses attribute bitmask
assert callable(curses.color_pair)
Gotchas
- Combine with attributes via
|: e.g.curses.color_pair(1) | curses.A_BOLD.
REPL Inspect
from curses import color_pair
help(color_pair)
Linked from
Related notes
- tuts/python3/stdlib_module/curses/color_content Linked here; links to this page; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/curs_set Linked here; links to this page; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/curses/assume_default_colors Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/baudrate Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/beep Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/can_change_color Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/cbreak shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/def_prog_mode shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/def_shell_mode shared tags: #curses, #stdlib