I can\'t get the terminal color palette to work with curses.
import curses
def main(stdscr):
curses.use_default_colors()
for i in range(0,7):
st
The terminal 'color palette' is set by the terminal application itself to map default curses colours to application-specific 'interpretations'. If you use red, the terminal can choose to display that as burgundy or cherry red, or if the user so desires, something completely different.
In other words, just use the curses colours (combined with or without the bright or blink modifiers) and things should Just Work.
I believe that the curses.use_default_colors()
call merely makes transparency available; it is a direct call to the use_default_colors() ncurses API function. ncurses colors are otherwise palette based; you need to set your own color attributes per pair number with curses.init_pair() calls, then select a color pair with curses.color_pair() from the palette to display text with that specific pair; or build text attributes directly for a given addstr()
call.