A mini demo translated from xterm.js
This is a feature implemented in iterm2
many years ago.
The idea is simple,
- Keep the background unchanged,
- increase the illuminance/brightness of the foreground if the contrast is too low
So that the contrast between text and background is always higher than the desired level.
Related https://github.com/KDE/konsole/blob/master/src/terminalDisplay/TerminalPainter.cpp