- for visual impairment reasons (eg high contrast colours)
- or to differentiate different servers (eg different background colours for dev or prod servers)
- or have less contrasting colours to reduce eye strain (eg the Solarized colour schemes)
- might suffer from colour blindness so pick colours that contrast better with their condition
- or even just those that prefer a white or other non-black backgrounds for readability reasons (eg they might be dyslexic and find a non-black background or different shades of text easier to read).
I do fall into two of those categories and run into this issue a lot since there is a trend these days for developers to hard code colour values into their applications.
Equally, some developers use the "you can select a custom colour map - I just define a pretty default" argument and while that's slightly better, the best option would be still to default to the standard 8 colours (or the default unformatted text) and let users opt into RGB values if they wish. This will save your users from constantly having to define the same colour palettes in every application.
It has been really 16 colours since the days of AIXTerm, even though that did not get formally standardized. Only a couple of places nowadays make the error of conflating bold and bright. It's not really "8 base colours plus highlight" at all, and that's certainly not the case with the tool at hand.
You are also approaching being a decade late with a plea not to use direct RGB colour. https://gist.github.com/XVilka/8346728 started in 2014, for example.
What the tool at hand really tells us is that there are already at least 18 different ways of specifying a colour palette. Perhaps the better idea nowadays is to promote a common 16-colour-to-RGB palette mechanism for TUI applications, akin to mailcap or something.
In particular, it allows your users to completely disable the highlights by using TERM=dumb.
Also, please check if the output is a tty (the isatty libc call) I don't know how many applications with fancy coloured output that looks completely broken when redirecting to a file.
That's my point :)
Those are actually called "RGBI"[0] colors (which would make the 8 base colours "RGB", though I haven't seen that usage), although that's clearly not what you mean by "RGB values".
0: 1 bit each for red,green,blue,intensity: #(r·AA+i·55,g·AA+i·55,b·AA+i·55)
Wikipedia has good introduction to the different SGR colour parameters: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
I'm talking about 3/4-bit (8/16 colours) not 8-bit (256 colours) nor 24-bit ("true colour"). The 3/4-bit colour palette is configurable in most terminals. True colour is not.
Can you clarify what your suggestion is please? I assume you're talking about ANSI color escape sequences. There are 3 different ways colors are represented using ANSI color escape sequences (see https://en.wikipedia.org/wiki/ANSI_escape_code#Colors)
1. Using the 16-color palette which is dynamic and under user control.
2. Using the 256-color palette, which are hardcoded colors.
3. Specifying 24-bit colors (RGB), which also hard-coded colors.
Are you asking developers of terminal applications to use neither (2) nor (3)? If so, that seems like an extraordinary, and inappropriate, request. I do hope however that developers of terminal applications make it possible to configure the application to use (1).
For example, do you disapprove of the existence of all syntax highlighting color themes unless they use only the base 16 colors?
* https://github.com/jdebp/nosh/blob/79b1c0aab9834a09a59e15d47...
* http://jdebp.uk./Softwares/nosh/guide/commands/TerminalCapab...
The issue is that these "stateful" URLs don't work when accessed directly. Try this one that I got by fiddling with the colors a bit:
https://terminal.sexy/#HR8hxcjGKCoupUJCjJRA3pNfX4GdhWePXo2Hc...
The site hangs and does not initialize.
Cheers
(I just emailed the site's author about it being discussed here as well)
https://elixir.bootlin.com/linux/latest/source/Documentation...
That would be very useful :)
Or this:
His script isn't truly random, but it does contain maybe twenty themes or so. During a normal day, he's working in 10+ terminals on various servers. The colours and placement of the terminals helps him to remember which server he's working on. So colours are only there to provide visual glue to help him determine the environment he's on, rather than being a personal preference for some theme. It doesn't matter that the grass theme is ugly, it's just the green terminal window which is currently an ssh session the stage database server.
Thanks for the submission.