bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling assume_default_colors


From: Thomas Dickey
Subject: Re: Handling assume_default_colors
Date: Tue, 1 Oct 2019 05:22:09 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Sep 30, 2019 at 11:12:24AM -0500, Bryan Christ wrote:
> Thomas,
> 
> In about 90% or more of all scenarios, pair zero is most likely color white

actually that depends on configuration (X defaults to black text on white,
but ncurses assumes white on back because that's documented in X/Open).

There's no portable way for ncurses to know whether its assumption is
correct; assume_default_colors is used to make mistakes about the assumption
less inefficient :-)

> foreground on color black background.  However, assume_default_colors()
> allows this "rule" to be broken.  As far as I can tell, there is no way for
> my terminal emulator to know about this change.
> 
> When an application uses init_color() and the underlying term is an xterm
> variant, ncurses emits a OSC sequence that tells me about this custom color
> (via XParseColor).  Would it be possible to have ncurses emit a different
> OSC to indicate when assume_default_colors() is used and what pair zero
> colors are (in XParseColor RGB values)?

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]