color console output

M

mdx

Hello all

Is it possible to tell print() or println() in System.out to print stuff
out to the console in color? Please show me how. Thanks

-Jay
 
N

Niels Dybdahl

mdx said:
Hello all

Is it possible to tell print() or println() in System.out to print stuff
out to the console in color? Please show me how. Thanks

You can do that with ANSI escape sequences if your console supports that.

Niels Dybdahl
 
I

IchBin

Niels said:
You can do that with ANSI escape sequences if your console supports that.

Niels Dybdahl
Never tried it. Don't think you can do it. I guess if you could write
some type of > VT220. I could be wrong.

--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
G

Gordon Beaton

Niels said:
You can do that with ANSI escape sequences if your console supports
that.
Never tried it. Don't think you can do it. I guess if you could
write some type of > VT220. I could be wrong.

I believe you are. AFAIK an ANSI driver for "Windows" text consoles
has been available since MSDOS 2.0 or thereabouts.

/gordon
 
I

IchBin

Gordon said:
I believe you are. AFAIK an ANSI driver for "Windows" text consoles
has been available since MSDOS 2.0 or thereabouts.

/gordon
Gordan.. Thanks for setting me straight.

--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
Joined
May 12, 2012
Messages
1
Reaction score
0
Hello,

It is an old post, so my answer is more for people that will Google on this subject.

I wrote an article on this suject recently. It provides a global understanding of the terminal, console colorisation and point other article on this subject.

http://blog.fastconnect.fr/?p=568&lang=en

---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top