VC6++下的那些颜色

来源:互联网 发布:xampp配置mysql端口 编辑:程序博客网 时间:2024/05/16 18:20

命令框下最简单的颜色和背景的显示:

代码为:

#include <stdlib.h>//包含头文件int main(){     system("color A0");//调用命令}
<span style="color: rgb(51, 51, 51); font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 28px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">A0中第一个</span><a target=_blank data-id="link-to-so" data-c="点击实体词http://wenda.so.com/q/13980799460617141.0.0_1.0.1十六进制数" text="点击实体词" target="_blank" href="http://www.so.com/s?q=%E5%8D%81%E5%85%AD%E8%BF%9B%E5%88%B6%E6%95%B0&ie=utf-8&src=wenda_link" style="font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 28px; white-space: pre-wrap; background-color: rgb(255, 255, 255); margin: 0px; padding: 0px; color: rgb(0, 99, 200); text-decoration: none;">十六进制数</a><span style="color: rgb(51, 51, 51); font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 28px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">A表示背景颜色,第二个十六进制数0表示字体颜色</span>

总共16中颜色选择,对应前面的编号如下:

0 = 黑色  A = 淡绿色

1 = 蓝色  B = 淡浅绿色

2 = 绿色 C = 淡红色

3 = 浅绿色 D = 淡紫色

4 = 红色E = 淡黄色

5 = 紫色F = 亮白色

6 = 黄色

7 = 白色 

8 = 灰色 

9 = 淡蓝色


0 0