Hacker News new | ask | show | jobs
by tolidano 2421 days ago
You should colorize CLI output. Why is that a fallacy? It’s so much easier to read in terminals that support it. You ever look at a terraform plan or inspec test reports without colors? Soul crushing. It’s like 3 control characters to color text, do it.
4 comments

Terminals don't render colors and fonts the same way, displays don't display them the same way, people don't see them the same way. You are also not going to colorize output properly keeping consistent perceived brightness and contrast, only making it harder to read, for most people at least (I have never seen it done properly, there is always plenty of stupidity like red letters on black backround). And it's not like it's hard to make colorization opt in.
This is why I like having customizable terminal apps like ConEmu because I can change the color themes.
> It’s like 3 control characters to color text

It's important to note that each specific terminal can have different control codes. The xterm ended up being the de facto standard but it's probably not a rule.

Agreed, I much prefer colourised output, _but_ ideally provide a non-coloured fallback. I hate having to pick data out from control characters when the colourised input is passed down through pipes.
It makes a good option for the human eye, but is likely to jack your pipeline right through the roof if it's the default.