nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] index/RGB colors and italic/reverse/underline a


From: David Ramsey
Subject: Re: [Nano-devel] [PATCH] index/RGB colors and italic/reverse/underline attributes
Date: Mon, 19 Feb 2018 00:23:43 -0600

Brand Huntsman:
> On 8/16-color, each RGB channel is mapped from 0-255 to 0-4, using
> c_shades[] (dark - 10% / 25% / 30% / 25% / 10% - bright), and then
> looked up in _low_color_cube[]. It uses the same layout as
> 88/256-color cubes: blue channel is incremented from left->right,
> green from top->bottom of each cube and red from first->last cube. I
> only selected a bright color if one of the channels was a 4. And dark
> channels are ignored if the other channels are > more than about 1
> above it.

Good to know.  Don't get me wrong: in my case dark blue still works for
both those cases, since anything much brighter would make it difficult
to see the brightwhite text (cyan works as the fallback case, as you
know from the 16-color fallback example, but nothing much brighter
would).

> One improvement you just reminded me about is to not convert 8-15
> values in that table to 0-7 on 8-color terminals. It can do exactly
> what 8-15 index values do and set the bright flag. I'll release a new
> rgb-color patch soon for this.

Okay.  Also good to know that I can remind you of stuff :)

> It would also make it easier to approximately determine what color an
> RGB/index value is, for those who can't fluently read them. And even
> more so for index colors, and while not portable, it would be nice if
> you had to ssh into a machine with index colors from an 8/16-color
> machine.

Indeed.

> Should we require the ":namedcolor" for all index/RGB values? It would
> prevent accidental use of RGB colors without a fallback in default
> syntaxes and make third-party distributed syntaxes more portable.

I say yes; both cases it prevents are important, even if the former is a
bit more so than the latter.

So then, if I understand what you mean correctly, applying the proposed
":namedcolor" requirement to effectively merge my 256-color scheme with
its 16-color fallback version would result in:

set functioncolor bold,#00bbff:brightcyan
set keycolor bold,#bb00ff:brightmagenta
set numbercolor bold,#bb00ff:brightmagenta
set statuscolor bold,brightwhite,#5500bb:magenta
set selectedcolor bold,brightwhite,#0055bb:cyan
set titlecolor bold,brightwhite,#5500bb:magenta



reply via email to

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