Answer the question
In order to leave comments, you need to log in
How to color console text with different colors?
How to color console text with different colors on Windows? Any AP will do.
Answer the question
In order to leave comments, you need to log in
Well, for example, in C# there is a standard property for setting color - Console.Color
Are you talking about Windows?
There is a color command in cmd. I have never used it, so I don’t remember the color of what it changes, look in the help. Her set of colors is rather poor.
The console also supports Esc sequences, where you can set the colors of the displayed characters. But here, most likely, you will have to use the low-level Console API: https://docs.microsoft.com/en-us/windows/console/c...
Perhaps some console libraries support this. Something like ncurses.
You can also look at the source code, for example Far manager, to see how they work with color in the console.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question