什么是ConsoleColors的实际RGB值? [英] What are the actual RGB values of the ConsoleColors?

查看:160
本文介绍了什么是ConsoleColors的实际RGB值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将彩色控制台输出为HTML。目前,我第一次翻译ConsoleColors同名的颜色(和暗黄色的手工,因为它不是present有)。

I'm converting colored console output to HTML. Currently, I'm first translating ConsoleColors to the Color of the same name (and dark yellow manually as it is not present there).

不过,我发现,一些颜色相同的名称和ConsoleColor看起来完全不同,例如CC-格林只#008000代替#00FF00(我证实的的实际RGB值)

However, I found that some Color and ConsoleColor of the same name look quite differently, for instance CC-Green is only #008000 instead of #00FF00 (which I confirmed is the actual RGB value).

我无法找到所有ConsoleColors,我可以在映射表中使用的实际RGB值的列表。有没有这样一份名单存在吗?

I could not find a list of the actual RGB values of all ConsoleColors, which I could use in a mapping table. Does such a list exist?

推荐答案

我最终只是检查自己的所有值。这些值有很大的不同,我不知道为什么人建议将按名称。

I ended up just checking all values myself. The values are very different, I have no idea why people recommend converting 'by name'.

Name         Actual      Drawing.Color of same name
Black        #000000     #000000
DarkBlue     #000080     #00008B
DarkGreen    #008000     #006400
DarkCyan     #008080     #008B8B
DarkRed      #800000     #8B0000
DarkMagenta  #800080     #8B008B
DarkYellow   #808000     #000000
Gray         #C0C0C0     #808080
DarkGray     #808080     #A9A9A9
Blue         #0000FF     #0000FF
Green        #00FF00     #008000
Cyan         #00FFFF     #00FFFF
Red          #FF0000     #FF0000
Magenta      #FF00FF     #FF00FF
Yellow       #FFFF00     #FFFF00
White        #FFFFFF     #FFFFFF

这篇关于什么是ConsoleColors的实际RGB值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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