Archived

This topic is now archived and is closed to further replies.

Linux console colors

This topic is 5775 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m quite new to Linux. I have already tried OpenGL and it worked just fine. But after that I wanted to make a simple console program with colors - a problem. Ncurses library gives me only 8 colors. I would like to have at least 16 colors (like MS-DOS has). Should I even use ncurses? How do I get those missing colors?

Share this post


Link to post
Share on other sites
I am not sure about ncurses.. I''m a newbie in the *NIX realm.. but in regular text modes.. via mode 0x03.. you should have all 16 colors to your disposal. You probably might have go into some low level stuff... the address for text is in 0xB800.. that''s in real mode old MS-DOS stuff of course.. =)

But i do not know anyway how to make a windowed console...especially in LINUX.. sorry.

I hoped I helped a little =P
good luck

Share this post


Link to post
Share on other sites
I figured it out by myself. Ncurses has this great feature that it has A_DIM and A_BOLD colors. If we want yellow it''s A_BOLD COLOR_YELLOW, brown is A_DIM COLOR_YELLOW. So actually there are all those 16 colors but they were hidden under the text attributes.

Share this post


Link to post
Share on other sites