8% of men of Northern European descent (and 0.4% of women) are red-green colorblind. That'd be a terrible choice. Use blue-orange, blue-red, or purple-green.
This approach is worse. Use red and green like everyone else and the user can choose their terminal color palette to differentiate in a way that works for them. Then it works the same across all commands. If you're the odd one out, you're adding more mental overhead for the user, not less.
You are ignoring that most people already have a cultural understanding of the colors red and green. Changes done for accessibility should never making things worse for the average user.
Red/green is semantic in these cases. They’re user configurable in almost all terminals, so there’s no real accessibility issue. I tend to associate blue with decorative accent, yellow with info/warning text, and cyan and magenta for really fancy stuff.
Red/green has no inherent semantics. It has the semantics that you assign it. If you choose to assign it meaning that disenfranchises 8% of men using your system, that's your choice, but it is not a good one.
Cultural semantics (diff tools, build tools,…: green/addition/ok, red/removal/error). And people with color blindness can alter the colors to something they can differentiate. And in the ansi sequences, they are actually numbers.
The standard terminal palette is only 16 colors. Even if you compress them all into the green-to-blue color range, it's still possible to distinguish all 16. The user can change "red" and "green" to whatever they like in the terminal preferences and then every 16-color app will be accessible with no additional effort from anybody.
Emojis aren't 7-bit clean. They're hard to type. They don't mean things the same way words do. `foo | grep -i error` communicates intent better than `foo | grep :-/` or whatever goofy hieroglyph someone chose instead of, like, a word with clearly defined meaning.
In my experience with live codebases, "error" or "warning" rarely mean the same thing to the same person, but admittedly you're much more likely to guess that they're in use as opposed to crying-green-clown emoji
I'd like to recommend rofimoji. I have it bound to a hotkey, so whenever I want to type an emoji, I just hit that hotkey and then a window pops up with my most recent emoji already visible at the top. Then I start typing in words that describe the emoji that I want like "crying" and it filters the list. Finally I select one and it pastes it into whatever text box I had selected before I hit the hotkey. My only complaint is I wish it worked for all unicode codepoints instead of just the emoji.
Yes that's why I also mentioned text labels. (strikethrough ansi codes aren't also fun to type). Besides, where are you needing 7but clean data ? Isn't that a narrow use case ?
It's the robustness principle. "Be conservative in what you do, be liberal in what you accept from others." A CLI author shouldn't assume support for UTF-8.
ok in that context use error or ok, just dont use color as ~10% of ppl have an issue with seeing colors perfectly (that includes people with epaper displays)
8% of men of Northern European descent (and 0.4% of women) are red-green colorblind. That'd be a terrible choice. Use blue-orange, blue-red, or purple-green.