Text color in C++

Aug 21, 2010 at 10:55am
Hello!
I'm new to C++, and I'm making a text game, where I want the text to be orange. The problem is that I can't figure out how to make it orange.
I've looked on many c++ pages source codes, but none of them wrote how to make the text orange.
I figured out that in CMD, when you enter "Color ?", but there are only 10 colors, and none of them are orange.

Can anyone tell how to solve this problem?


- Jan

Aug 21, 2010 at 11:02am
console has 16 colors and orange is not one of them.
Aug 21, 2010 at 11:05am
system("Color C"); is a light red color, its not exactly orange,but I'm not aware of any other way to change colors
Aug 21, 2010 at 11:09am
hamsterman!-Can you show me sample of changing to one of 16 console color. ?
Aug 21, 2010 at 11:12am
Thanks
CodyShort
for "system("Color C");" my question to
hamsterman
got answer.
Aug 21, 2010 at 11:15am
What about background color,guys?
Aug 21, 2010 at 11:16am
No problem.. I'm glad this forum has a part dedicated to beginners
Aug 21, 2010 at 11:20am
Google is your best friend... http://ss64.com/nt/color.html
Aug 21, 2010 at 11:21am
Thanks i tried this, it work :)
system("color fc");
Aug 21, 2010 at 11:24am
Thanks again for best link...
Aug 21, 2010 at 11:48am
No problem I just hope ou pay around with text games for a while, but can eventually learn some graphics programming
Aug 21, 2010 at 6:29pm
system("color fc") will set the color of all text on the screen.
To change the color of specific text use http://msdn.microsoft.com/en-us/library/ms686047(v=VS.85).aspx (if you use windows)
Aug 22, 2010 at 11:20am
here's a topic where there's a better explanation (I believe from hamsterman) about how to change the background colour: http://cplusplus.com/forum/beginner/25985/
Topic archived. No new replies allowed.