Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: improve colors used in CLI output to be friendly for dark/light background terminals #5242

Closed
wolverian opened this issue Nov 28, 2019 · 7 comments · Fixed by #5250
Closed
Assignees
Labels
feature-request A feature should be added or improved. in-progress This issue is being actively worked on. package/tools Related to AWS CDK Tools or CLI

Comments

@wolverian
Copy link

Screenshot 2019-11-28 at 16 33 04

Reproduction Steps

Run cdk init app --language=typescript in a Terminal with a light background color. I used VS Code Insiders with the i Light color theme.

Environment

  • CLI Version : 1.18.0 (build bc924bc)
  • Framework Version:
  • OS : macOS Catalina 10.15.1 (19B88)
  • Language :

Other

In general I recommend disabling color output unless the user explicitly requests it.


This is 🐛 Bug Report

@wolverian wolverian added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 28, 2019
@shivlaks
Copy link
Contributor

@wolverian - are you able to use the --no-color option successfully?

@shivlaks
Copy link
Contributor

the option can also be set as a preference in ~/.cdk.json if that's a desired default

{
"no-color": true
}

@shivlaks shivlaks added the p2 label Nov 29, 2019
@shivlaks shivlaks self-assigned this Nov 29, 2019
@shivlaks shivlaks added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed bug This issue is a bug. p2 needs-triage This issue or PR still needs to be triaged. labels Nov 29, 2019
@SomayaB SomayaB added package/tools Related to AWS CDK Tools or CLI in-progress This issue is being actively worked on. labels Nov 29, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Dec 2, 2019

Even if --no-color works, I would still propose that we don't have logging.print() add color.

@wolverian
Copy link
Author

I can report that --no-color removes color from the output, thank you.

@shivlaks
Copy link
Contributor

shivlaks commented Dec 3, 2019

@rix0rrr - I can see the benefit there as well... I was briefly looking at chalk and yargonaut as better alternatives. happy to repurpose this issue into a feature request.

did you have something different in mind?

@shivlaks shivlaks added feature-request A feature should be added or improved. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Dec 3, 2019
@shivlaks shivlaks changed the title aws-cdk cli output unreadable in a terminal with a light background cli: improve colors used in CLI output to be friendly for dark/light background terminals Dec 3, 2019
@wolverian
Copy link
Author

wolverian commented Dec 3, 2019

So, there are two features here that I would like:

  • Make the output equally readable on all dark and light backgrounds, and
  • Don't use colors by default, or support the NO_COLOR environment variable (ref. https://no-color.org).

@l0b0
Copy link
Contributor

l0b0 commented Dec 14, 2020

Why is this closed? There is a workaround, but the default is still colour (which is very useful) and the contrast is pretty bad on a dark background:

Screenshot from 2020-12-15 12-02-42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. in-progress This issue is being actively worked on. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants