[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unable to set black text color for cdk
From: |
Thomas Dickey |
Subject: |
Re: unable to set black text color for cdk |
Date: |
Tue, 31 Mar 2015 20:54:51 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Mar 30, 2015 at 12:31:33PM +0200, daggs wrote:
> Greetings,
>
> I'm trying to setup a text in black color and it ends up in gray, looping
> over the first 49 colors (with and without bold) didn't returned any label
> with black text color, is it possible that there is no black color text in
> cdk?
hmm - it's more complicated than that - partly Cdk and partly (n)curses.
The initCDKColor function is probably what you're looking at, since
it is the only place that calls init_pair(). It's a little odd (I think)
because it maps the colors 0-7 in this order:
COLOR_WHITE, COLOR_RED, COLOR_GREEN,
COLOR_YELLOW, COLOR_BLUE, COLOR_MAGENTA,
COLOR_CYAN, COLOR_BLACK
If the terminal supports more than 8, cdk uses only 8. You can always
override that by calling init_pair() in your application.
Normally in curses, black is zero. That raises a point, i.e., that color
pair 0 is special in curses (no colors as such). So cdk does not use that.
In any case, since black is last, you would see black text on pairs 57-64,
due to the way the loops are ordered.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature