Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you’re a CLI, you should never (a) set background colours, or (b) use more than the 16 colours range¹, unless the user configures it so.

If you’re a TUI (as in, full-screen terminal app), you should probably not (a) set background colours, or (b) use more than the 16 colours range¹, unless the user configures it so.

—⁂—

¹ And you can’t even wisely use most of the 16 colour range—the intense colours might be higher or lower contrast, so they’re not useful how people want to use them, and black and white could both be either the higher contrast or literally invisible, when used against the default background; and blue, yellow, bright yellow, bright cyan are each very difficult to see on some common themes, those that’s becoming less common.



Sadly, the state of CLI and TUI tools is that background colors _will_ be encountered soon or later, if you use a wide range of software. And I struggle quite a bit sometimes to make everything in my terminal legible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: