We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,752 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Change color

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

2
Contributors
5
Replies
15 Hours
Discussion Span
1 Year Ago
Last Updated
6
Views
Question
Answered
Zssffssz
Junior Poster
180 posts since Sep 2011
Reputation Points: 6
Solved Threads: 2
Skill Endorsements: 0

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

Narue
Bad Cop
Team Colleague
15,460 posts since Sep 2004
Reputation Points: 6,483
Solved Threads: 1,407
Skill Endorsements: 54

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
Skill Endorsements: 0

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
Team Colleague
15,460 posts since Sep 2004
Reputation Points: 6,483
Solved Threads: 1,407
Skill Endorsements: 54

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
Skill Endorsements: 0
Narue
Bad Cop
Team Colleague
15,460 posts since Sep 2004
Reputation Points: 6,483
Solved Threads: 1,407
Skill Endorsements: 54
Question Answered as of 1 Year Ago by Narue

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0728 seconds using 2.68MB