[Top][All Lists]

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

Re: [Nano-devel] A patch for added color support

From: Erik Lundin
Subject: Re: [Nano-devel] A patch for added color support
Date: Tue, 21 Oct 2014 22:21:59 +0200

On Tue, 2014-10-21 at 21:30 +0200, Benno Schulenberg wrote:
> On Sat, Oct 11, 2014, at 13:28, Erik Lundin wrote:
> > I have created a patch to add support for 256 colors in nano.
> By the way, Erik, what do you think of the way Dave Geering added
> support for 256 colours in ?
> (He didn't actually post a patch, so I attach effective diff here.)
> Benno

Adding support to define colors in more ways might be a good idea. The
question is on how this could easily be documented or showed by example.
It might be harder to explain to a new user how to define a converted
RGB color to the color they are looking for then directing them to the
official xterm-color256 palette. But my experience is that most users
google color themes for their favorite editor and then just apply it
directly. Most people that actually design new color themes are power
user that know exactly what color they are using (probably using an
example palette).

So introducing the "nano color numbers" might be a good or bad idea.
It's difficult to know. But changing this further down the track is a
bad idea. Then "some" of the google provided themes might work and some
wont. It might just be better to only provide one way to add the
extended colors?

The code supplied has several problems as i see it. Giving negative
numbers like: -5:-5:-5 will get unexpected results. Ceiling the color
numbers will definitely lead to frustration for a lot of users if they
try to define real RGB values (0-255) for each color. A warning if the
color is beyond the possible limit would be great.

Other then that it doesn't check if the terminal even supports the
extended colors (through the COLOR variable or any other method). Some
terminals support more then 8 and less then 256 colors. I personally
think the only way to go is to revert it to no colors at all for those
Erik Lundin <address@hidden>

reply via email to

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