Live data from Hacker News

How to choose colors for your CLI applications (2023)

blog.xoria.org

81–90 of 103 posts

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

#81
post #80

I made the "Aardvark Blue" a while back[1] to solve some of the problems that most color schemes have. The goal of this theme is that: - colors are fairly natural - background and black are distinct - grays are naturally ordered avoiding full black - light and dark colors are distinct from each other - all colors look good on background, black, dark gray, gray, white We use this for all the screenshots on https://rat…

Funny thing, those are not "the usual places" I've ever heard of, and I care somewhat about color schemes. Each of us lives in our own bubble... (my bubble is not iterm2 and not windows)

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

#82
The problem with CLI colors is that they operate on the wrong abstraction layer. Individual program shouldn't send "this text is red" but "this text signals failure" and then terminal interprets "failure" as "red". Until this change happens (never) colors in CLI will remain a hot mess.

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

#84
post #39

As long as CLI programs stick to the 8 or 16 standard colors and refrain from setting background colors (inverse mode is fine), as well as from explicitly setting white or black as text color, everyone can reasonably configure their terminal colors so that everything is readable. When going beyond that, the colors really need to be configurable on the application.

> refrain from setting background colors That's the thing though, setting bg color opens up a lot of options, and constraining to invert is not sufficient in my opinion.

Sticking to the \x1b[4X background color is probably safe as that can be tweaked by terminal color palettes. It’s when you use the 256 or RGB \x1b codes that it becomes an issue. Ok for foreground.

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

#85
post #45

Colourful terminals are so useful. I have mine colour coded according to the working directory depending on the project. So I can see which terminal is associated with which project even if there are twenty terminals open. The scripts are even in my servers so when I ssh in to them it changes colour as well. https://michael.mior.ca/blog/coloured-ssh-terminals/

Very cool. Thanks for sharing!

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

#87

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

Big blocks of text are difficult to parse

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

#89
post #81
post #80

I made the "Aardvark Blue" a while back[1] to solve some of the problems that most color schemes have. The goal of this theme is that: - colors are fairly natural - background and black are distinct - grays are naturally ordered avoiding full black - light and dark colors are distinct from each other - all colors look good on background, black, dark gray, gray, white We use this for all the screenshots on https://rat…

Funny thing, those are not "the usual places" I've ever heard of, and I care somewhat about color schemes. Each of us lives in our own bubble... (my bubble is not iterm2 and not windows)

Where are some of the usual places you look?

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

#90
post #89
post #81

Earlier quoted context omitted.

Funny thing, those are not "the usual places" I've ever heard of, and I care somewhat about color schemes. Each of us lives in our own bubble... (my bubble is not iterm2 and not windows)

Where are some of the usual places you look?

I don't usually look anywhere, but things I sometimes see pop up in various places are eg https://terminal.sexy/ or https://vimcolorschemes.com/
Post reply on HN