2 ms·
The problem here is that applications can set a background colour, and that as an application you don't know what colours the user defined. For example Angband
by Beltalowda 4y ago
The problem here is that applications can set a background colour, and that as an application you don't know what colours the user defined.
For example Angband just sets the background colour to black (not sure about Nethack), so if you defined colours that work well on a light background you're still going to have a bad time. Quite a few other terminal programs (especially those using ncurses or other interactive TUI interfaces) tend to set a background colour.
There isn't really a good way to deal with this using the default 16 colours other than never setting any background colours, which can be a bit limiting for interactive applications. The best solution is to have application support for this and using 256 or 24 bit "true" colours (256-colour support is pretty much universal, and 24 bit colour support is very wide-spread).
- layer8 4y agoThe best solution is for the background color (and possibly other colors) to be configurable for the application, as many applications allow. If a user prefers white or black background, he/she usually prefers it in all applications. 256 or more colors has the drawback that the user can’t configure the colors anymore to his/her needs (light vs. dark, high-contrast, color blindness, etc.), unless the application also provides comprehensive theming support. In that case, the 16-color variant is a much simpler solution.