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

Portable console colours?

Hi everyone. First time poster here :)

I'm working on my final project for a computing course at university, and I was wondering if anyone knew of a portable library or solution to changing console colours. I understand that such functions are OS specific (I'm working on Win32, but my prof is a Mac-grrl) and thus likely a giant headache for someone of my limited experience... but hey, it would be nice to try for bonus points.

Just curious.
TYIA.

MachDelta
Newbie Poster
6 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

I have run into this problem and I ended up just doing all coloring with easy to use ANSI colors which are supported on Linux/Mac, and on Windows I just run all my apps in Cygwin, which translates these ANSI commands into native Win32 API calls (at least I think that's how it does it). The advantage with using Cygwin is that it also gives you a unix compilation environment, so you can text if your is cross platform compatible (although some of my code compiles in gcc on Mac but not in gcc on Windows :/)

xfbs
Light Poster
33 posts since Nov 2011
Reputation Points: 6
Solved Threads: 2
 

This article has been dead for over three months

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