On this page
  1. curses.init_pair
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

curses.init_pair

Prev: curses.init_color | Up: curses | Next: curses.initscr
Rel: curses.assume_default_colors, curses.baudrate, curses.beep, curses.can_change_color
Ref: docs.python.org — curses.init_pair
Tags: #public #python3 #stdlib #curses


Import

import curses
from curses import init_pair

Signature & Overview

curses.init_pair(pair_number, fg, bg, /)

Change the definition of a color-pair.

Usage

import curses

# Registers a foreground/background pair: curses.init_pair(1, curses.COLOR_GREEN, -1)
assert callable(curses.init_pair)

Gotchas

REPL Inspect

from curses import init_pair
help(init_pair)

Linked from

Related notes