hub-tool icon indicating copy to clipboard operation
hub-tool copied to clipboard

Reduce use of colours, as they may be hard to read

Open thaJeztah opened this issue 4 years ago • 9 comments

Description

I noticed hub-tool uses colours (blue) for column-headers, and my terminal theme's "blue" is quite hard to read. Of course, this is something I should fix in my terminal settings, but others may run into this situation as well; given that colours for column-headers don't seem to be a critical feature, perhaps we should disable colours, to match the main docker cli's output;

Screenshot 2021-01-06 at 11 39 00

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

(paste your output here)

Output of docker hub --version:

hub-tool --version

Docker Hub Tool v0.2.0, build 0edf43a

thaJeztah avatar Jan 06 '21 10:01 thaJeztah

/cc @silvin-lubecki @rumpl

thaJeztah avatar Jan 06 '21 10:01 thaJeztah

I find colours to be very user friendly, they help to quickly see the difference between useful data and other stuff, like table headers for example.

I used node/npm/javascript stuff a lot in the past and I find the outputs really nice to look at

Screenshot 2021-01-06 at 11 48 07 AM

Of course we shouldn't over-use the colours, it's not christmas any more.

We could add a --no-color though for users that have problems with colours.

rumpl avatar Jan 06 '21 10:01 rumpl

To an extend, yes, I agree; errors in a different color are helpful.

Not sure if column headers in a different color add much though, and it's not very common to use (e.g. commands like ps aux, top don't use colours for it) 😅

thaJeztah avatar Jan 06 '21 10:01 thaJeztah

Yes, but htop that I use uses colours :)

rumpl avatar Jan 06 '21 11:01 rumpl

htop is a TUI, don't think we can compare that really

More examples where it doesn't work well currently;

Screenshot 2021-01-06 at 12 57 58

thaJeztah avatar Jan 06 '21 11:01 thaJeztah

I agree that dark blue isn't nice to read, but I think we matched buildkit blue output 🤔 @thaJeztah do you have the same issue with docker build?

silvin-lubecki avatar Jan 06 '21 13:01 silvin-lubecki

Yeah, docker build output is known to be problematic as well (I think there's a tracking issue for that somewhere)

FWIW, I'm not against colours, but we should use them in places where they add enough value; e.g. for the hub-tool login example above, the Username: and Password: output is the only output that's printed; I think adding color there (currently) doesn't add much value.

thaJeztah avatar Jan 06 '21 13:01 thaJeztah

I will dare say: please add an option of --no-colors. Makes life easier for scripting!

rsaffi avatar Jul 13 '21 20:07 rsaffi

For scripting, perhaps it should be automatic disable colors when (e.g.) piping output, and if no TTY is present

thaJeztah avatar Jul 13 '21 20:07 thaJeztah