4

I was trying to find if it is possible to colour console output in windows system. I found that Console - Ansi but i cant find any information about coloring output in windows prompt.

I woudl appreciate information about my problem.

4

3 回答 3

4

It's been a while, but I think the correct usage is:

setRGB [SetColor Foreground Yellow, SetColor Background Red]

to set yellow writing on a red background. Also setTitle followed by a String sets the console window title.

于 2012-07-05T19:34:26.530 回答
0

It worked for me like this:

set the foregroundcolor to Yellow

    setSGR [SetColor Foreground Vivid Yellow]

and then reset it to normal after putting your String on the screen

    putStrLn "ayellowstring"
    setSGR [Reset]

You need

    import System.Console.ANSI

to do this

于 2016-10-28T17:33:46.470 回答
-1

PowerShell and the console setting will be the solution.Console only have 16 colors,but you can config any 16 colors you like(i.e. you can make gray scale console)

this link explain how to

于 2013-05-09T08:40:10.623 回答