How to get a brightwhite color in ncurses?

dahpgjgamgan picture dahpgjgamgan · Dec 13, 2009 · Viewed 6.9k times · Source

How to init a color pair with light grey background, and bright white foregraound?

init_pair(number, COLOR_WHITE, COLOR_WHITE) creates a color pair with light grey foreground and backround, but I need foreground to be really white. I tried combining COLOR_WHITE with A_BLINK (through bitwise OR) but that doesn't work. Ncurses howto's/examples/documentaion couldn't help me either.

Answer

jimrandomh picture jimrandomh · Mar 10, 2010

You need to set the bold attribute. Call attron(A_BOLD) before you write and attroff(A_BOLD) after.