Earlier quoted context omitted.
CLI apps can detect the background color of the terminal, and determine contrasting colors accordingly.
They can? Is this a recent thing? I remember wanting to detect the background colour years ago, and not finding any way to do it.
How to choose colors for your CLI applications (2023)
41–50 of 103 posts
Re: How to choose colors for your CLI applications (2023)
#42Re: How to choose colors for your CLI applications (2023)
#43Use only default (white/black), red for bad, green for good. If you need more than that, like vim or whatever, then maybe a 'fullscreen' TUI is better, with a specified background and foreground. For CLI tools, I'm not sure if I prefer more colours. The CSS to make the terminals look like iTerm was smooth, to the point I read them as screenshots.
Re: How to choose colors for your CLI applications (2023)
#44I'm a bit color blind and it might be quite common to show errors in red but when the background is black, I can't see it at all.
Re: How to choose colors for your CLI applications (2023)
#45Re: How to choose colors for your CLI applications (2023)
#46Use only default (white/black), red for bad, green for good. If you need more than that, like vim or whatever, then maybe a 'fullscreen' TUI is better, with a specified background and foreground. For CLI tools, I'm not sure if I prefer more colours. The CSS to make the terminals look like iTerm was smooth, to the point I read them as screenshots.
Color is cultural. Red is associated with good in China
Re: How to choose colors for your CLI applications (2023)
#47Re: How to choose colors for your CLI applications (2023)
#48I really wish you wouldn't. All the rinky dink colors and animations screw with the CLI output when you don't correctly detect whether the user's running the app interactively. Keep it plain text. Regular, old, boring output is good.
Re: How to choose colors for your CLI applications (2023)
#49Re: How to choose colors for your CLI applications (2023)
#50Earlier quoted context omitted.
Which is a good reason to stick with the de-facto standard of red for bad and green for good.
unless you're colour blind