Is there any way to define custom colors in curses other than using init_color
and init_pair
? I’ve used custom 24-bit color codes with print()
before, such as 33[38;2;{r};{g};{b}m
(which sets foreground to a custom RGB color), but curses.COLORS
and curses.COLOR_PAIRS
restricts me to a total of 768 colors and 256 pairs when using curses.addstr
.
I’m using python 3.12 and the Windows terminal -> Powershell, by the way. I know Windows terminal can handle 24-bit color codes because the aforementioned ANSI color codes work for both background and foreground. Could I possibly bring this functionality into curses? (essentially, how can I use more than 256 color pairs in the curses.addstr
function?)