Defining a new color in ncurses

久未见 提交于 2019-12-01 10:44:45

init_color() is the only way to define new colors but the number of colors and color pairs available depends on the terminal you are using.

Many terminals can support up to 256 colors but on most systems the default TERM value is xterm which only supports 8. xterm can be compiled with 256 color support and I think gnome-terminal supports 256. Try changing your TERM enviroment variable to xterm-256color and check the COLORS variable in your ncurses program.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!