Color console output in windows

I tried to find out if the console's color output is possible on a Windows system. I found that the Console is Ansi , but I cannot find the output coloring information in the Windows prompt.

I will be grateful for the information about my problem.

+4
source share
3 answers

It has been a while, but I believe that the correct use is:

  setRGB [SetColor Foreground Yellow, SetColor Background Red]

Set yellow letter on a red background. In addition, setTitle followed by String sets the title of the console window.

+4
source

It worked for me like this:

set the foreground color to Yellow

  setSGR [SetColor Foreground Vivid Yellow] 

and then reset to normal after placing your line on the screen

  putStrLn "ayellowstring" setSGR [Reset] 

You need

  import System.Console.ANSI 

to do this

0
source

PowerShell and console setup will be the solution. The console has only 16 colors, but you can customize any 16 colors that you like (i.e. you can make a console with a gray scale)

this link explains how

-1
source

All Articles