如何获得ncurses的亮白色? [英] How to get a brightwhite color in ncurses?

查看:80
本文介绍了如何获得ncurses的亮白色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何初始化具有浅灰色背景和亮白色前景色的颜色对?

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

init_pair(number,COLOR_WHITE,COLOR_WHITE)创建一个具有浅灰色前景和背景色的颜色对,但是我需要使前景真正成为白色.我尝试将COLOR_WHITE与A_BLINK组合(通过按位OR),但这不起作用. Ncurses howto的/examples/documentaion也帮不了我.

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.

推荐答案

您需要设置粗体属性.写入前请致电attron(A_BOLD),之后再致电attroff(A_BOLD).

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

这篇关于如何获得ncurses的亮白色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆