Terminal colours are tricky
jvns.ca
jvns.ca
1. It makes sense in retrospect, but I was very surprised at how much more subtle light themes are compared to dark when viewed on different screens; of course their hardware and software configs lead to variations on the color output, but light dominant changes are perceived so much more drastically than dark ones. This is a serious issue if you will be porting your theme to computers with a variety of screens and configurations.
2. Occasionally, you need to drop to a linux or bsd console with very limited support for fonts and fancy colors. Then your `fd` and `exa/lsd/whatever` may be unusable and annoying, especially if you have mapped the latter to `ls`. I managed, after a long struggle, to get a working fbterm in my system to get decent terminal features without X, but fbterm has its own issues. You need to account for this use-case, especially when configuring vim colorschemes: make sure that you have a fallback theme for a feature-poor console or you have really practiced typing vim commands blind :D
Edit: here is a screenshot of my stylized fbterm screen, obviously not for serious work, but meant to demonstrate what you can do without X: https://i.imgur.com/RbDRgtD.png
[0] https://github.com/xlucn/dotfiles
It is Lu Xu's dotfiles you should focus on if you want to understand how fb* tools work.
I invoke fbterm via this script to set the bg image:
#!/bin/sh
# fbterm-bi: a wrapper script to enable background image with fbterm
# usage: fbterm-bi /path/to/image fbterm-options
printf '\033[?25l' # hide cursor
fbv -ciuker "$1" << EOF
q
EOF
shift
export FBTERM_BACKGROUND_IMAGE=1
exec /bin/fbterm "$@"I found the best option for easily distinguishing a large number of colours was the monochromatic spectral "rainbow" colours on a black background (there's also a setting to make the data points have a bit of "bloom" aura in the same colour so they look like dots of light).
It makes sense from a colour saturation perspective (i.e. signal to noise ratio across the spectrum) that a black background is better.
You can pretty much have 10 different colours
EDIT: Another benefit is it conveys "sequence/order/distance" information: yellow is between red and green; orange is between red and yellow, etc. It's easy to subdivide and interpret how "close together" two colours are.
This does not surprise me. I do analog black and white printing (from film) and it's a well known thing that our eye is much better at detecting subtle tonal changes in light areas of a print than darker ones. For this reason, a lot of the time in tweaking the right exposure and contrast for a print is spent to make those hightlights look "just right". I don't print digitally, but I am sure the same principles will apply there too.
I just did a check on my NixOS system there and the console seems fine? The ANSI blue on black for directories in eza is a bit... meh, but it's perfectly readable and the same is true for the default colour scheme for ls on MacOS terminal
Really good colors and organization of the terminals, it would be great for serious work too in my view =p
Normally you should be able to rely on a properly set TERM variable [1], and CLI utilities should respect the capabilities they can gain from the TERM variable.
Sadly, a lot of "modern" CLI tool frameworks - particularly those written in JavaScript - tend to ignore this.
[1] https://www.gnu.org/software/gettext/manual/html_node/The-TE...
Starting using Linux at 15 in 2002. Didn't realise how "early" that was then (especially compared to now, seemed old then). Been working professionally in the space since 2006. Now I'm 37. Yikes.
On the plus side it definitely works for your more basic tools.. for most of the non-basic ones, as a hack you could pipe the output to "cat" as most tools try to detect if the terminal is interactive or not to remove colors from output being piped. It also annoys me we don't have a better way to signal that, and I have to pass --colors and hope it's supported to every command where I want the colors but just to filter the output by line with grep.
Anyway...
Step 1:
Most terminal emulators ship with a garbage default colour scheme. So change that.
Personally I'm a fan of Solarized (specifically dark, but I like their light theme too). However even if you don't like Solarized, there are plenty of other themes that are readable with any colour against the default backgrounds.
Step 2:
Avoid any CLI tool that uses escape sequences for 8bit or 24bit colours by default. This might be an unpopular opinion, but I actually consider that as user hostile. Reason being: I've already chosen a the best terminal colour scheme for my readability requirements (remember, this will differ for different people). Having a developer override that because they fancy themselves as a pseudo-designer is not helpful. By all means, they can have an option to enable themes in their tool if they wish, but that should be opt-in, not the default.
As someone who spends most of their life in the terminal, following those two rules is enough to provide a consistent and easy terminal reading environment with almost-zero configuration overhead.
I think the real problem is that we indulge developers using 8bit and 24bit colour escape codes.
How difficult is this in practice? (Julia's article mentions this idea too without going deeper into the struggles)
A related topic is: Do terminal color schemes only concern themselves with the 16 base colors or do they also meddle with the RGB and greyscale parts. I mean you could also adapt the 8bit and 16bit colors to your readability requirements.
Same is true for 8bit. Most terminal emulators tend not to support altering those colours either.
In practice, the only application I use that I've had to configure the colours for was tmux. But I tend to forget about tmux because its one of those applications that needs a lot of a configuration from the outset anyway (in my opinion at least).
There might be other "must have" tools that set the background colours too. I've either not needed them personally, or have completely forgotten about them
Yes, but then there are applications that set both the text and background colour. For example pamix sets the background to black, or tmux's statusline, or ngrok. And you end up in a rabbit hole trying to deal with that.
Step 1: I think here maybe the default setting should be solarized-dark/light on terminals. It's honestly a good and sane default. It's purpose built to be less hostile on the eyes in my opinion, which should likely be what's aimed for in a default setting... the themes and colors are there for people who like to stare at their terminal all day (if you only use it once or twice then you don't care about what color it has) so it should be eye-friendly defaults. if people want to muck about changing it to their own custom theme they won't be bothered about defaults anyway since they will immediately customize it.
I personally hate the fact I even need to swap a theme, or download and reformat some Xresources file tediously (while looking at godawful colors in the process!). I just want my eyes not to burn.. don't care what colors yield that result.
Same questions to others who've posted qualms with Solarized.
I tend not to spend much time configuring things these days so have always landed on Solarized out of laziness.
There are lots of websites out there where people have shared their terminal color schemes, I would recommend seeking one out and looking for a screenshot of one that catches your eye.
And to be fair to Solarized, it was really novel when it came out. But we’ve had years to improve upon it since.
So I’m genuinely interested to hear some recommendations. Ideally themes that are “standardised” (for lack of a better phrase) so that I’m likely to find a VSCode theme as well as iTerm2 etc.
I know I could just look online myself but customisation can quickly end up becoming an “addiction” (again, for want a better phrase) where you spend more time “configuring” than “doing”. A procrastination trap I’ve fallen into many times before. The appeal of Solarized is its better than most defaults and it’s easy to find so that stops me from spending too much time playing. And the appeal of having someone else tell me to use something else is that I also don’t fall into that proverbial rabbit hole.
This touches on the problem of good defaults. If the user has to configure it then the user must know that it is configurable and then do it. This is a serious hurdle and only a tiny fraction of users will do it.
Over the years I've come to the conclusion that you must throw your new features into the face and shove good defaults down the throats of users, otherwise these feature are hardly used.
8bit and 24bit colors are already opt-in and you can configure it. Your TERM and COLORTERM environmental variables determine if a (well behaved) terminal program will use those colors.
Agreed to an extent. I wouldn't call ignoring the systems colour preferences as "good defaults". But I do agree with your more general point.
> 8bit and 24bit colors are already opt-in and you can configure it. Your TERM and COLORTERM environmental variables determine if a (well behaved) terminal program will use those colors.
Unfortunately it's not that simple. Both the "256color" suffix to $TERM and $COLORTERM env vars report terminal compatibility -- not user preference.
Neither are standards either. It's a push to even call them a de facto standard because they're often not used by either terminal emulators nor application developer alike.
There is another env var that does report user preferences: $COLORFGBG, but that receives even less support than the former two vars.
There's also $NO_COLOR (or is $NOCOLOR?), which seems to be honored a little better. However the problem with this is it turns colour off completely. ie you cannot specify "use 4bit but not 8bit nor 24bit colour".
Like all things terminal detection wise, it's all a big fat steaming mess of inconsistencies. Which is why I think the best default is 3/4bit or no colour at all if $NO_COLOR / not a TTY. And have all the cool 24bit themes as an optional extra.
Unless it's a TUI app that I'm going to spend a lot of time in (e.g., Emacs), I do not want it theming itself. I want it to look at my termcap to see if it has ANSI color support, and if it does, then emit ANSI color codes. I use base16-shell to set my terminal colors and I want CLI and TUI apps to respect them.
Terminal compatibility that is expected to be used. If you only want the 16 base colors then this is the way to go. This is the most reliable and best supported way to get that in the terminal.
If you want some tools to still output 256 colors, you can change the TERM variable on the fly: "TERM=$TERM-256color infocmp -L".
You also should unset COLORTERM. It's for specifying that this terminal supports 24bit colors.
Using terminfo will give you at least a standard approach to what defaults to use. If you don't want to configure your terminal then you are asking others to do something you are not willing to do.
If we are supposed to go with the lowest common denominator without terminfo capabilities, we would even lose 4bit colors. Then only the basic 8 colors are safe because there a lot of terminals now that don't support the workaround of "bold plus basic color gives bright color" anymore.
I've talked a lot recently about the problems with env vars for terminal detection and the problems with developers not understanding how to correctly query terminal capabilities. Heck, some don't even correctly support non-TTY outputs (ie pipes). And then there's the issue that terminfo is a C library so a lot of languages with average to no-C FFI support cannot use it without fork()ing -- which is slow. Plus terminfo is POSIX only which eliminates platforms like Windows -- which is increasingly a target now that Windows Terminal supports ANSI escape sequences.
It's a mess and blaming that on history and terminfo really misunderstands that the real problem is modern tools not respecting or having compatibility with that history, rather than the history breaking things.
> If we are supposed to go with the lowest common denominator without terminfo capabilities, we would even lose 4bit colors. Then only the basic 8 colors are safe because there a lot of terminals now that don't support the workaround of "bold plus basic color gives bright color" anymore.
You're missing the point. It's not about supporting the lowest common denominator -- though I'd love you to give some example of terminal emulators in common use that don't support 4-bit colours ;)
It's about supporting user defaults. Themes based on 8-bit and 24-bit colour pallets are defined by the developer. Whereas themes based on 3 and 4-bit colour pallets are defined by the terminal user.
Hence why I say applications should default to the terminal defaults (defined by the user)
There's times when applications should support 24-bit regardless of the user preferences. Such as image rendering in the terminal. But those are exceptions rather than the norm. And precisely why things like `256-color` and $COlORTERM need to be defining terminal support not user preference.
export TERM=ms-terminal
Windows is POSIX. Windows NT always had a POSIX layer.
Terminfo is mostly a file based database collection. You don't need to link to the C library, you just must be able to read the terminal infos.
> You're missing the point. It's not about supporting the lowest common denominator -- though I'd love you to give some example of terminal emulators in common use that don't support 4-bit colours ;)
The question is not about support but about how to get them to be display. Which escape sequences produces colors 8-15? The answer is different from terminal to terminal and that's the problem.
A few problems with that:
1. That then breaks any applications that look for either `xterm` or `256-colors` in the TERM string. Unfortunately these days $TERM behaves more like a User-Agent string in HTTP-land so most terminal emulators are forced to pretend to be `xterm` even when they're not.
2. `export` is a Bourne Shell-ism. Powershell's syntax looks a little more like:
$Env:<variable-name> = "<new-value>"
https://learn.microsoft.com/en-us/powershell/module/microsof...> Windows is POSIX. Windows NT always had a POSIX layer.
Windows is not POSIX. Windows has POSIX compatibilities in some places but POSIX defines a plethora of different things beyond just C-APIs.
For example: Windows doesn't have a lot of the command line utilities defined by POSIX: https://en.wikipedia.org/wiki/List_of_POSIX_commands
> Terminfo is mostly a file based database collection. You don't need to link to the C library, you just must be able to read the terminal infos.
mostly is doing a lot of heavy lifting there.
Also reading those databases without C is non-trivial as well. For example try manually parsing the output of /usr/share/terminfo/74/tmux-256color on macOS.
It's also worth noting here that there's two different database formats: terminfo and termcap. And different locations each platform (and users!) might configure those databases to reside.
Also tools like `tput` do more than just look up $TERM against terminfo. There are actually a few different places where terminal capabilities are hidden. Including ANSI escape codes, which was originally used in the hardware terminal days before $TERM existed and are still expected to be supported by modern terminal emulators.
Let's not forget that you also need to check if you're reading from, or writing to, a TTY. It might actually be a pipe, or even just a regular file. And while there is a standard C API for checking if a file descriptor is a TTY, `isatty()`, that itself is just a hack because there's no ABI in TTYs to return true/false if they are a TTY. So instead isatty() has to send ioctl calls to alter the state of the TTY, but a state that's only supported by TTYs (ie incompatible with pipes and regular files). It's a hack that's worked well for decades, but it's yet another class of edge cases that people take for granted.
> The question is not about support but about how to get them to be display. Which escape sequences produces colors 8-15? The answer is different from terminal to terminal and that's the problem.
The escape codes don't differ. There is one standard set of escape sequences for 4-bit (8->15). https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-b...
What differs is the shade of colours that are produced with those escape codes. And that's exactly why I advocate that developers should stick to 3/4-bit code.
The point I'm making is that those colours are defined by the terminal and configurable by the user. Which means individuals can set a colour profile that is readable for them. This is why CLI and TUI developers should default to, and respect, those preferences.
Take a read through my comment history. I'm an author of a multitude of advanced CLI and TUI applications as well as terminal emulator and thus I've discussed these topics at great lengths with other people.
>> Avoid any CLI tool that uses escape sequences for 8bit or 24bit colours by default.
I was going to point out that the author never takes a step back and asks "What would be the best way to handle this?" The problem there is we have to define what "best" is. IMHO that involves a number of principles. My preferences are:
1) Any user customization should be in one place.
2) The impact on programs should be minimal (in LoC for example).
Both of those suggest the solution belongs in the terminal.
IMHO it starts with terminal programs having sane default colors. What that means is fuzzy, but so is this whole discussion. IMHO colors should follow the "standard" so that blue is still recognizably blue. But consideration should be given to the common forms of color blindness - for example I have a hard time reading pure red on black (adding a bit of anything helps this, don't just use ff0000).
Once terminals get fixed to have sane defaults, CLI programs should use those 16 standard colors. Any attempt to use 24bit here is either saying "I give up on getting those terminal folks to offer sanity" or it's saying something like "I know best", but either way users end up with N programs they have to configure. Lets not define themes in cli apps OK? Remember, this is my answer to "what would be the best way to handle this?"
I have similar thoughts when it comes to web sites and fonts. Present content in HTML so users can configure how they want to see it. Similar for page formatting - it's not a magazine layout, let it flow.
Also stuff in desktop software. IMHO Wayland compositors should remember window placement. It was stupid for every X program to store and restore its window position. Wayland says knowing about the environment is a security issue (and I agree) but then it becomes the DEs job to handle this memory. It also unburdens ALL the apps from having code for this.
There are other areas where that question comes up "Where in the software stack should this thing be handled?" Whatever your opinion, I believe you should start by answering the questions around that word "should". What are the goals in selecting where a thing gets handled? My answers always lean toward simplicity and maintainability. What other principles might I adopt to answer these questions?
A styling service from systemd.
Nearly all other colorschemes represent 'bright black' as a gray color, which is readable against the black background.
:syntax off
is my only vim configuration because terminal color sets were designed by computer programmers and electrical engineers and other people who don’t understand that the important thing about colors is not the colors but the brightness.Especially coding, I find almost all coloring to be distracting and counterproductive. Doubly so when I'm bouncing back and forth between Linux ans Windows. Many tools' default use of color borders on (or crashes head on into) unusable.
Some tools offer a --color=never option, and a good number respect NO_COLOR. Unfortunately, not all do, and even those that purport to assume that those modes will only be used for use in pipelines, programmatic interfaces, and such. That leads to all sorts of unfortunate behavior.
They have a consistent color scheme concept of semantically significant color temperature, while leaning warm to save your eyes from staring at so much blue light. Comes with alacritty colorscheme
These days I just gave up and manually configure most apps to use ANSI colors (e.g. fzf etc have command switches for that), and let Vim and Emacs be the only non-ANSI apps which are instead set to match the colorscheme I use in the rest of the terminal. (Although stuff like vim-dim let’s you go one step further if you want.)
That also leads to problem 12: Certain popular terminals that default to setting TERM=xterm256-color while not being xterm-compatible.
Edit: I just came across `xtermcontrol`, which can abstract the background check in scripts, and is in all the major package managers.
It's probably too late for terminals to add a concept of semantic color, other than "default foreground" and "default background", but the situation as it is forces TUI authors to either stick to the basic eight or make colors completely user-configurable, if they don't want to leave anybody out.
By semantic color I mean what editors do, where the presentation is separated from the intention. Unclear how to even start with that for terminals though.
(To someone out there about to tell me about how I can custom theme HN: please consider that I might spend too much time here already and don't need it to be easy to use in the dark. Cheers)
When you're wondering why Emacs chose poor colors for something, it's often frame-background-mode being wrong.
[0]https://doc.endlessparentheses.com/Var/frame-background-mode...
For dark-background terminals with white text:
export COLORFGBG='15;0'
For light-background terminals with black text: export COLORFGBG='0;15'png file: https://drive.google.com/file/d/1mkMESeGf7MNdKa-rPDx7Yf9BDit...
imgur link: https://imgur.com/a/flatui-7mqVZAY
Based on: https://flatuicolors.com/palette/defo
I've been using mine for about a decade too. It works well for iTerm, vim, Emacs, vscode etc etc
However, Apple have languished with their Terminal support, they don't to >256 colors and some of the other more modern stuff is lacking and it doesn't really work with a Neovim+LazyVim setup.
I've been trying to find a "better" terminal and have bounced around between iTerm2, Kitty, Alacritty and Wezterm, but while they all are more "modern", I find that none of them seem to have that basic "New Window with Profile ..." option that lets me quickly open windows with different background colors/themes (at least without some screwing around).
Currently settled on Wezterm, mostly because it also works on Windows and I can share my wezterm.lua configuration (I should note that Windows Terminal is actually pretty good too). I still do find my self running Apple Terminal for quick things (e.g. using python3 as a REPL to do math or testing hex/binary stuff out etc).
iTerm has exactly that.
1. https://wezfurlong.org/wezterm/config/lua/config/launch_menu...
2. https://wezfurlong.org/wezterm/config/lua/window-events/augm...
Yeah, it takes some screwing around, but programming extremely specific features just the way you want them is peak WezTerm experience.
There are a few things I miss from iTerm2 (mostly mouse related), but otherwise it took me a few evenings to configure it to my liking (cmd-n opens a new window at the default dir, not the current one) and I've been a happy user since.
If you are writing a command line tool and you absolutely insist it must have colours then stick to the ANSI 16 colours or allow end users to customize the colour scheme.
Maybe because I've had to work on enough remote consoles without any, or limited, color support where I'm more concerned about the problem at hand than which shade of blue is being output for directories. Ok, I'll admit I adjust the default apple terminal 'pro' scheme colors a bit, adding a bit of contrast to the background because I'm in it all day, but beyond that, nothing. I find coloring has little to no positive effect on my productivity, and in some instances, hinders it. No colors on ls, I actually get a bit annoyed when color escapes reach stdout via logs now, hah. Hell, that extends even to my $PS1. I've never bothered to update it on this system. Crotchety, grizzled ops person perspective maybe?
It takes me maybe 10min when I get a new computer (usually Mac) to have Oh My Zsh and Powerlevel10k installed on my machine, configure p10k with the awesome setup wizard, change to my coding font, and tweak my background and foreground to dark teal/off-white. After that I never have to touch it again and it looks amazing for the rest of my working days. The default PS1 mods from p10k giving me directory context, info on k8s, docker, and python venv, along with info on last run cmd like exit code and runtime, are all just so valuable and I got them for basically free.
I can understand not wanting to constantly tweak it and I agree with that but I would have to disagree that making any customization is a waste of time.
I lie a little... I do disable colorization when possible, or set everything to be white on black when I can't just turn it off.
All with obnoxious colours AND blinking if a threshold gets met. .bashrc (and associated)is read-only (and) overwritten at every login.
But, I can `source .my-env` And bring sanity to my session.
I'd rather have a 'default-plain' then some forced-bling that a dev thought was cool 20 years ago.
Now, yeah, in the case of the terminal, it's probably not so bad because the remote system _probably_ won't override my settings, or it's probably relatively easy to force my side to take priority, but it still falls into the bucket of "huge chores with minimal payoff".
Also crotchety, grizzled ops person who invests too much time into solving the problem right in front of them and not enough time into stepping back and engaging in possibly-fruitful sidequests.
If you’re a TUI (as in, full-screen terminal app), you should probably not (a) set background colours, or (b) use more than the 16 colours range¹, unless the user configures it so.
—⁂—
¹ And you can’t even wisely use most of the 16 colour range—the intense colours might be higher or lower contrast, so they’re not useful how people want to use them, and black and white could both be either the higher contrast or literally invisible, when used against the default background; and blue, yellow, bright yellow, bright cyan are each very difficult to see on some common themes, those that’s becoming less common.
That’s because Solarized only has 8 accent colors + 8 monotones: https://ethanschoonover.com/solarized/
Your 16 color all-color “Solarized Light” is a derivative work based on Solarized, not the original Solarized.
I'm also not happy with Solarized because it's so low contrast.
Some programs have Github themes that seem to be okay.
I tried Catppuccin but I'm not sure if I like it or not. It's better than Solarized but still pretty low contrast.
Is there a color scheme I might like that's supported across multiple applications? IntelliJ, iTerm2, lazygit, neovim come to mind.
https://bugs.kde.org/show_bug.cgi?id=451109
I wonder how hard this is to patch.
Realistically, how often do you restart your compositor and why?
The answer seems to be “there’s no standard, terminal emulators just choose colours and it’s not very consistent” '
That doesn't surprise me. What surprises me, is that there are people who apparently think that choosing a RGB value other than 0,0,0 for black would be a good idea. A lot of money is being spent to increase contrast and they are simply throwing it away (not to mention the wasted power on e.g. OLED devices).
echo SYSTEMD_COLORS=16 | sudo tee -a /etc/environmentSometimes it's due to COLORFGBG not being set.
Sometimes it's due to failing to implement the legacy "bold = intense" hack (from the 8-color days), which very many programs rely on.
Sometimes it's due to the colorscheme having all colors be too bright. It's abominable how far some of those colorschemes are from the VGA standard.
(Sometimes it's a gamma-ish problem. I can't believe it's $CURRENTYEAR and computer screens still vary so badly).
---
Here's a quick test for several problems. These are bad color combinations that shouldn't be chosen, but they should be readable with just a bit of effort. Output is 2 lines, one offblack-on-black, one white-on-offwhite.
printf '\e[3%d;1;4%dmThis should be (barely) readable.\e[m\n' 0 0 7 7
Results with default configuration on Debian stable: alacritty: fail (no obvious configuration)
cool-retro-term: pass (despite deliberately neutering color)
deepin-terminal: marginal pass (colorscheme too bright)
Eterm: pass
foot: fail (no obvious configuration; buggily packaged as X11 despite being Wayland-only)
gnome-console (really?) = kgx: fail (configuration does not contain an obvious fix)
gnome-terminal: fail (need to go into preferences and check "show bold text in bright colors")
kitty: fail (no obvious configuration)
konsole: half-fail (colorscheme too bright)
linux: pass
lxterminal: fail (check "bold is bright" in preferences)
mate-terminal: pass
mlterm: pass
pangoterm: pass
pterm: pass
qterminal: pass
rxvt: pass (it, along with its derivatives (I don't remember which right now, but several are probably listed here), has other unfixable bugs though, and should be avoided unless you are deliberately trying to write a program that works even with abominable terminals)
sakura: fail (no obvious configuration)
stterm: marginal pass (colorscheme too bright)
terminator (the gnome one): fail
terminology: pass
termit: fail (configuration does not contain an obvious fix)
tilix: pass
xfce4-terminal: pass
xiterm+thai: marginal fail (colorscheme contrast too low in both directions somehow)
xterm: pass
yakuake: half-fail (as konsole)
zutty: marginal pass (colorscheme too bright)
(not that this test is only for colors, not for the many other features you might expect a terminal to support)And by 'adapted' I mean I just removed the Anchor, Blur, ColorRandomization, FillStyle, WallpaperFlipType, and WallpaperOpacity attributes. I don't know whether I could've just left them be, but they don't really matter anyway.
An alternative to the suggested unbuffer trick is to tell your receiving programs to handle color by default (case-by-case or in .profile)
LESS=-R less
> LS_COLORSman dircolors(1) has more info
Mapping from 24-bit color to the 256 color cube is pretty reasonable though, since the colors are close enough that you would have a hard time reading them in the first place.
– Only use the 16 ANSI colors, with the default (or user-configurable) background.
– Configure the 16 colors on your terminal client so that they are readable on your chosen background color(s).
Everything is legible. You need to be the pickiest picky princess of pea to be annoyed by that.
I still think that white on black and green on black still work very well. At least for me in the past 40 years.
The colors themselves are one part of the equation, the other being the mapping to semantic elements, like GUI widgets or syntax groups.
I feel there are some unwritten rules despite and beneath all the apparent inconsistency.
For example keywords are almost universally somewhere in the red blue area, never green. For comments it's the opposite, most often greenish or grey.
But this is all tacit and to the best if knowledge nowhere written down.
This isn’t true. Blue’s probably most common these days, but black, orange, brown, yellow, green… they’re all pretty common, probably similarly common to red. In Pygments, the default theme even uses bold green for keywords.
> For comments it's the opposite, most often greenish or grey.
OK, this one’s more true. Other colours are sometimes used, but greens and greys are far and away the most common.
It does seem like half this article is correctly answered by "there is a standard (VGA), but some terminals (and in particular, the Solarized colorschemes) trample all over it and break everything."
Like, there are indeed a lot of buggy terminals, but Solarized will ONLY ever make things worse, since all correct programs assume something close to VGA.