Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Doc/library/curses.rst
  • Loading branch information
serhiy-storchaka authored May 3, 2025
commit 031f16139b236fccbf52d93a22627b08efc5f41e
11 changes: 6 additions & 5 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ The module :mod:`curses` defines the following functions:
Allow use of default values for colors on terminals supporting this feature.
Use this to support transparency in your application.

Assign terminal default foreground/background colors to color number ``-1``.
So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red
on default background and ``init_pair(x, -1, COLOR_BLUE)`` will
initialize pair *x* as default foreground on blue.
Change the definition of the color-pair ``0`` to ``(fg, bg)``.
* Assign terminal default foreground/background colors to color number ``-1``.
So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red
on default background and ``init_pair(x, -1, COLOR_BLUE)`` will
initialize pair *x* as default foreground on blue.

* Change the definition of the color-pair ``0`` to ``(fg, bg)``.

.. versionadded:: next

Expand Down