Open gyscos opened 8 years ago
Indeed, "light" colors in the linux TTY are achieved using the bold attribute (which doesn't result in actual bold text, just lighter color). When applying a color, we'll then need to:
ncurses::has_colors()
)So on linux TTY, we'll need to actually use the darker color. This means the color pair should be initialized with the darker color. But in this case, how does it know that it should activate the bold attribute, since the color pair content will just show a dark color?
One solution is to move to termion right now, but I'm not sure has_colors
is available (plus, a few other things aren't stable yet).
Alternatively, we need ncurses to know that a color pair imply a new attribute. This can come from a global variable that maps color pair to extra attributes? That's not great, but ncurses already has a global color pairs configuration, so it's not much worse...
Backends now have an inner state, so it'll be easier to remember which color needs to be faked with a bold effect.
Using the "outset" border style in a linux TTY prints black cells instead of the light white borders. It should probably use the main color with the bold attribute.