What are the actual RGB values โ€‹โ€‹for ConsoleColors?

I am converting color console output to HTML. Currently, I am first translating ConsoleColors into a color with the same name (and dark yellow manually, as it is not there).

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

I could not find a list of actual RGB values โ€‹โ€‹for all ConsoleColors that I could use in the mapping table. Is there such a list?

+1
colors console
Jan 29 '15 at 9:23
source share
1 answer

In the end, I just checked all the values. 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 

CC RGB test

+2
Jan 29 '15 at 9:45
source share



All Articles