[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colours in general..
From: |
Thomas Dickey |
Subject: |
Re: Colours in general.. |
Date: |
Wed, 18 Jun 2003 12:13:46 -0400 |
User-agent: |
Mutt/1.3.28i |
On Wed, Jun 18, 2003 at 04:10:58PM +0100, Mike Aubury wrote:
> When using KDE, I get a white background.
> Using the normal Linux console - its black...
>
> So if I want to use colours, don't I need to know the background colour first
> (I may well be missing something here!)
yes/no. applications such as midnight commander simply color their own
background. color terminals weren't that common 20 years ago.
>
> eg
>
> If its a white background :
>
> // And of course - the COLOR_WHITE here is just a slightly darker shade than
> the background!
>
> init_pair (1, COLOR_WHITE, COLOR_WHITE);
> init_pair (2, COLOR_RED, COLOR_WHITE);
> init_pair (3, COLOR_GREEN, COLOR_WHITE);
> init_pair (4, COLOR_YELLOW, COLOR_WHITE);
> init_pair (5, COLOR_BLUE, COLOR_WHITE);
> init_pair (6, COLOR_MAGENTA, COLOR_WHITE);
> init_pair (7, COLOR_CYAN, COLOR_WHITE);
> init_pair (8, COLOR_BLACK, COLOR_WHITE);
>
> If its a black background :
>
> init_pair (1, COLOR_BLACK, COLOR_BLACK);
> init_pair (2, COLOR_RED, COLOR_BLACK);
> init_pair (3, COLOR_GREEN, COLOR_BLACK);
> init_pair (4, COLOR_YELLOW, COLOR_BLACK);
> init_pair (5, COLOR_BLUE, COLOR_BLACK);
> init_pair (6, COLOR_MAGENTA, COLOR_BLACK);
> init_pair (7, COLOR_CYAN, COLOR_BLACK);
> init_pair (8, COLOR_WHITE, COLOR_BLACK);
>
> Or something similar...
>
>
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-ncurses
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net