4

I have been writing console apps for a while and noticed that the consoles (such as cmd.exe) support RGB colors but the 'Console' class for .NET doesn't. Does anyone know of a library that would allow RGB colors for a console app in C#?

user2038443
  • 163
  • 1
  • 11
  • 1
    You mean outside of 16 colors ([ConsoleColor](http://msdn.microsoft.com/en-us/library/system.consolecolor.aspx) ) ? Please show a sample what you are talking about than. – Alexei Levenkov Mar 31 '13 at 18:02
  • yes other than colors in `ConsoleColor`. I want to be able to set the `Console.Foreground` color to a color with an specific RGB value. – user2038443 Mar 31 '13 at 18:07
  • Than please give a link / name a program that does that... because MSDN does not exactly agrees with your statement see - [SetConsoleTextAttribute](http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx). – Alexei Levenkov Mar 31 '13 at 18:16
  • right click command prompt shortcut, go to colors tab, RGB values are an option. – user2038443 Mar 31 '13 at 18:24
  • 1
    just found out this can be done with any shortcut to a console app, so why cant it be done programmatically? Seems like it should be possible... – user2038443 Mar 31 '13 at 18:27
  • 2
    I think your question already has been answered: http://stackoverflow.com/questions/7937256/changing-text-color-in-c-sharp-console-application – Patrik Svensson Mar 31 '13 at 20:45
  • So it looks like Patrik found the duplicate question that contains the answer how to customize 16 colors. If you need more than 16 colors at a time - you need to specify it in your question (along with sample console program that does it). – Alexei Levenkov Apr 01 '13 at 05:50

1 Answers1

4

I have found a solution but it is not worth the time and effort, this should be easier to do and i hope that in future versions of .NET framework this process will be simplified.

Community
  • 1
  • 1
user2038443
  • 163
  • 1
  • 11