954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Change color

Ok how do I change the texts color without changing all the couts to printfs and without using system("color hex")

Zssffssz
Junior Poster
180 posts since Sep 2011
Reputation Points: 6
Solved Threads: 2
 

By 'without using system("color hex")' do you still mean "works on all systems magically"?

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

No, I mean can I write a chunk of code for this in a function for something, so yes. Is this why people love java?

Zssffssz
Junior Poster
180 posts since Sep 2011
Reputation Points: 6
Solved Threads: 2
 
can I write a chunk of code for this in a function for something, so yes.


You can write a function for it, yes. What you can't do is write a function that magically works on every possible platform. Console text color is inherently non-portable.Is this why people love java?
Wide portability without losing functionality is one of Java's selling points.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Ok than like in my other thread; how do you change color on the other two giants OSX and Linux?

Zssffssz
Junior Poster
180 posts since Sep 2011
Reputation Points: 6
Solved Threads: 2
 
Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: