[elinks-dev] Re: transparency and background

Johannes Zellner johannes at zellner.org
Thu Oct 16 08:56:53 PDT 2003


On Thu, Oct 16, 2003 at 03:28:09PM +0200, Petr Baudis wrote:
> Dear diary, on Thu, Oct 16, 2003 at 12:24:51AM CEST, I got a letter,
> where Johannes Zellner <johannes at zellner.org> told me, that...
> > Hi,
> 
> Hello,
> 
> > in src/terminal/color.c:set_term_color16, the check for fg == bg should
> > be removed IMHO:
> > 
> > -     if ((d_opt && !d_opt->allow_dark_on_black) || bg == fg) {
> > +     if (d_opt && !d_opt->allow_dark_on_black) {
> > 
> > Example: if _terminal_.transparency == 1, the fg color should
> > NEVER be adjusted, as the bg color isn't valid at all.
> > 
> > 
> > in other words, if the configuration is:
> > 
> >     set document.colors.allow_dark_on_black = 1
> >     set terminal._terminal_.transparency = 1
> > 
> > and
> >     # set document.colors.background = is not set!
> > 
> > it makes no sense to adjust the foreground color accoring to the
> > background color.
> 
> this is simply not true, document.colors.background is only one of many
> cases when background is used. It is used for menu/status bar, dialogs,
> for documents with background changed inside (if
> document.colors.use_document_colors == 2), for links highlighting etc.
> The transparency is "done" only if the background color is black.

for my taste, the best would be to turn off color adjustments
completely. I'd rather like a color model where I have full control
over the colors.

Example: I use terminals with black text on white background. If I
specify document.colors.background = "white" I get gray (which is NOT
what I want). What I want is not putting out any escape sequences for
the background at all. This happens if I specify transparency = 1. But
then the automatic color adustment replaces my black foreground color
by gray, because it thinks that I've a black background and doesn't know
that it's actually transparent.

To summarize: either do no color 'optimizations' if allow_dark_on_black
is on or introduce another option 'document.force_colors' which turns
off all color optimization.

-- 
Johannes



More information about the elinks-dev mailing list