Simple Colors?

Cameron Simpson cs at cskk.id.au
Tue Feb 25 03:54:32 UTC 2020


On 24Feb2020 20:15, Paul Gilmartin <PaulGBoulder at AIM.com> wrote:
>On 2020-02-24, at 18:24:36, Cameron Simpson wrote:
>> The colours are requested with escape sequences and the colour 
>> displayed are thus dependent on your terminal emulator; the names 
>> "white" etc map to a palette. So you want to start with the settings 
>> in your terminal emulator.
>>
>> For reference, here are some colours from my ancient ANSI colour python module, where you can see 0, 7, 4 etc embedded.
>>
>>   # the known colour names and their escape sequences
>>   COLOURS = {
>>       ...
>>       'green': '\033[32m',
>>       ...
>Isn't terminfo supposed to add an abstractlon layer
>so I can just say "green" and not memorize " '\033[32m'"?

Absolutely. That's what mutt does. I was just demoing some hardwired 
ANSI colour escape sequences as examples to show the low and numeric 
nature - they basicly specify an index into a palette.

>And I still prefer "#00FF00".

If your terminal has full colour and there's an escape sequence for RGB 
values, yes indeed. Bypasses weird palettes and says what you want.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Mutt-users mailing list