tlf-devel
[Top][All Lists]
Advanced

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

Re: A unified color scheme?


From: Thomas Beierlein
Subject: Re: A unified color scheme?
Date: Sat, 23 May 2020 17:39:50 +0200

Hi Nate,

these are really good and valid points. From my experience in last
years I can confirm that color handling via ncurses is quite some
nightmare especially when you use a terminal emulator under X. 

So thanks for the link below with some thorough discussion about the
problems. 

Am Fri, 22 May 2020 06:14:19
-0500 schrieb Nate Bargmann <address@hidden>:

> I've long kind of poked at the color scheme in Tlf but really haven't
> done much about it.  As it is currently coded there are checks of the
> TERM environment variable for the values of 'rxvt', 'xterm' and
> 'xterm-256color'.  I see no explicit test for a TERM value of 'linux'
> but yet such a setting has an effect.
> 
> The Linux console generally features the classic VGA color palette
> though it can be changed and I have found the Ubuntu releases to be
> guilty of doing so.  In fact, I delved into this over this past winter
> and came away with some understanding and wrote about it on my blog:
> 
> https://www.n0nb.us/blog/2020/02/coping-with-color-on-the-linux-console-and-xterm-and-friends/
> 
> The first half of the post concerns the console and the second half
> Xterm and RXvt.
> 
> As the man page has carried mention that Tlf is a console program for
> a long time, it appears the color scheme has been crafted for the
> console. However, I suspect most of us run Tlf in a terminal emulator
> in a GUI desktop and the colors don't match the console.  The
> difference is not serious but it does show many inconsistencies.  For
> example, on the console the header line is bright yellow text on a
> bright green background.  In my experiments the terminal emulators
> simply cannot display this combination.  

Right most emulators allow only bright foreground but no bright
background. I think that was the reason for using inverted color
pairs in TLF from the beginning.

If you look to other programs using ncurses few uses a white/gray
background. Better combinations results from having blue as background
and using white of yellow letters. But I think that is to much to
change now.

> A heavier weight of brown
> text on a bright green background can be shown that is visually quite
> different from the console.  This has to do with using the ncurses
> A_STANDOUT attribute on the color pair that also inverts the color
> pair.
> 
> I've submitted a pull request that provides a sample Xresources file
> for Xterm and URxvt to use a VGA color palette.  I've also attached
> screenshots (I hope they make it through) that show Tlf on the
> console, in an Xterm, and finally in URxvt.

As I wrote on the PR I like that settings. It is nearly the same as
xterm or xterm-256 on Xfce's terminal emulator. It gives a good
contrast but without being strenuous to the eyes.

The screenshots are coming through. I guess forst screen shot is from
pure Linux console, second one from xterm with your Xresource file and
the last from urxvt?

The problem with the different shades of white in the last  screenshot
may be solved by setting a pure TERM=xterm. I had similar problems in
the past with the introduction of xterm-256color not handled properly.

> I've tried invoking Tlf as 'TERM=xterm tlf' (TERM=xterm-256color works
> too) on all three terminals and it appears to be the most consistent
> color scheme.  Is this something we should aim for to simplify the
> code a little bit, although I'll admit it may not be the most
> readable on the console.  Instead, I think that simply unifying Xterm
> and URxvt and leaving the console alone is a better idea.
> 
For the time being I think it may be a good decision. 
As a reminder: If TERM is NOT set to xterm or rxvt TLF assumes you are
using plain linux console and allows you to set the colors via TLFCOLOR=

73, de Tom DL1JBE


-- 
"Do what is needful!"
Ursula LeGuin: Earthsea
--

Attachment: pgp0frAq6IaZR.pgp
Description: Digitale Signatur von OpenPGP


reply via email to

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