Live data from Hacker News

How to choose colors for your CLI applications (2023)

blog.xoria.org

1–10 of 103 posts

Re: How to choose colors for your CLI applications (2023)

#2
Use 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)

#4

Use 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.

> red for bad, green for good

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.

Re: How to choose colors for your CLI applications (2023)

#6

Use 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.

> red for bad, green for good 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.

More importantly, dont use color as sole source of information. Strikethrough, emoji or ok / bad can also be used.

Re: How to choose colors for your CLI applications (2023)

#7

Use 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.

> red for bad, green for good 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.

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.

Re: How to choose colors for your CLI applications (2023)

#10
post #7

Earlier quoted context omitted.

> red for bad, green for good 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.

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.
Post reply on HN