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

Create styleguide for b #110

Open
ghost opened this issue Nov 2, 2020 · 6 comments
Open

Create styleguide for b #110

ghost opened this issue Nov 2, 2020 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 2, 2020

The terminal can have coloured text and some degree of formatting. We should therefore come up with a styleguide for b so that all output is consistent and easy to read/understand.

Some ideas...

  • White: default colour
  • Blue: headings, status message icons
  • Cyan: questions, prompts
  • Magenta: log message icons, example text
  • Green: success message icons
  • Yellow: warning message icons
  • Red: error message icons
@ghost ghost added the type: enhancement label Nov 2, 2020
@indigoxela
Copy link
Member

Outch...! Can there be an override via local settings?

I'm always using my shells with (almost) black text on (almost) white background - less nerdish but way friendlier to my eyes.
Which means, that I wouldn't see any normal text and warnings because of missing contrast.

@ghost
Copy link
Author

ghost commented Nov 2, 2020

Hmm, interesting... These are the colours used: https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit Will need some testing I guess.

@indigoxela
Copy link
Member

Will need some testing I guess

I'd be glad to help out with some testing. Is it possible to have a (global) setting to switch colors off/on? (If it's not too complicated)

@jlfranklin
Copy link
Member

I like this idea, I agree with @indigoxela that there need to be a global off/on for it. I'd add the following to the feature list:

  • Default should be "reset/normal" (ESC[0m) not white (ESC[1;37m).
  • If STDOUT is not a terminal (i.e., STDOUT is being piped or redirected), this should automatically turn itself off.

Bonus points:

  • Allowing all the colors to be set in the config file,
  • A pair of presets -- one for a dark-background terminal, one for a light-background terminal (like the default macOS terminal.)

@hosef
Copy link

hosef commented Dec 12, 2021

Many commands have a --color option and you can alias bee to bee --color to have colors always enabled.

@ghost
Copy link
Author

ghost commented May 15, 2022

This appears to be an emerging standard for allowing output that defaults to showing colour, to be disabled: https://no-color.org/

I think we should add support for that to Bee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants