nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] about support for more than 16 colors


From: Benno Schulenberg
Subject: Re: [Nano-devel] about support for more than 16 colors
Date: Tue, 9 Jan 2018 21:47:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


Op 09-01-18 om 01:37 schreef Brand Huntsman:
I also propose %RRGGBB and/or R-G-B percent-based colors are supported (alternate formats for cube/gray colors). The first uses channel values from 0-99% but is scaled to 0-100. The second uses 0-100% channel values. Example: %994900 and 100-50-0. Might be easier for some to use these instead of #RRGGBB
colors.

Might be.  But I like it that the hex color codes have a fixed, unchanging
size.  And these codes can be found all over the net, no need for another
format.

The attached source code initializes gray, cube and base lookup tables and
has functions to map RGB/gray colors to 8/16/88/256-color terminals. It also
has functions to parse the four color formats mentioned above.

Thanks.  Looking at the output of ./a.out 256, on my terminal #333333 looks
darker than its surrounding colors.  The same for #1A1A1A and #4D4D4D.  But
#66666 and #808080 and above blend in fine with their neighbors.

Benno



reply via email to

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