Why I only get 8 colors out of ncurses?

This is a discussion on Why I only get 8 colors out of ncurses? within the C Programming forums, part of the General Programming Boards category; I'm coding in Gentoo Linux, using ncurses and testing my applications using the GNOME terminal. I have no problems using ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    158

    Why I only get 8 colors out of ncurses?

    I'm coding in Gentoo Linux, using ncurses and testing my applications using the GNOME terminal.

    I have no problems using colors, but I only get 8 and it would be nice to have a few more... I know the GNOME terminal has support for a 16 color palette, but I don't know how can I use them all with ncurses. Well, I know way...

    It's like this, I have 7 color pairs for the colors: red, blue, yellow, green, cyan, magenta and white with black background. If I use this colors with the attribute A_BOLD (to make the text bold) I don't only get the text in bold but the colors of the text will be the other 7 colors defined in the GNOME palette.

    My question is, how can I use this other 7 (or 8 if you count black) colors without having to bold the text?

  2. #2
    Mad OnionKnight's Avatar
    Join Date
    Jan 2005
    Location
    Umeň, Sweden
    Posts
    555
    I'm not entirely familiar with how terminals work in Linux as opposed to Windows, but those other 8 colors should just be a lighter/darker variant of the first 8. I guess that A_BOLD is just a fancy name for toggling the use of darker and lighter colors.

  3. #3
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,169
    If you understand what you're doing, you're not learning anything.

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    158
    But using the A_BOLD thing, actually turns the letters bold... Yes, they are a bit lighter with the same color but they also are bold and I don't want that.

    I'm gonna take a look at that...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Relation between material colors and light colors.
    By indigo0086 in forum Game Programming
    Replies: 3
    Last Post: 04-18-2007, 03:20 PM
  2. colors in forefox and colors in IE
    By MisterSako in forum Tech Board
    Replies: 3
    Last Post: 05-15-2006, 01:59 PM
  3. Ncurses and Standard Functions
    By gsoft in forum C Programming
    Replies: 2
    Last Post: 02-07-2005, 07:18 PM
  4. ncurses, windows, and colors
    By subflood in forum Linux Programming
    Replies: 2
    Last Post: 08-26-2004, 10:14 AM
  5. NCurses: Problem with bckg colors
    By Karl in forum C Programming
    Replies: 2
    Last Post: 01-20-2004, 02:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21