-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: better output colors #7377
Conversation
991ae58
to
3d0d8f0
Compare
No more grey, no more setting background colors
@lukekarrys rebased and fixed merge conflicts in the view command. |
// This is the general approach to color: | ||
// Eventually this will be exposed somewhere we can refer to these by name. | ||
// Foreground colors only. Never set the background color. | ||
/* | ||
* Black # (Don't use) | ||
* Red # Danger | ||
* Green # Success | ||
* Yellow # Warning | ||
* Blue # Accent | ||
* Magenta # Done | ||
* Cyan # Emphasis | ||
* White # (Don't use) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wraithgar : could you elaborate on why black and white are not explicitly used?
I assume it's because we'll defer to the terminal's default coloring which should hopefully allow users to colorize as desired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume it's because we'll defer to the terminal's default coloring which should hopefully allow users to colorize as desired.
It's exactly that.
Typically a terminal will configure a separate foreground and background color, discrete from the customizable 16 color palette. From what I've seen they will not also adjust black and white in the palette to be in accordance w/ the foreground/background colors.
If one wants to display with the foreground color, then print with "no" coloring. There is also bold and dim if you need those. In cases where you really do want the background color, you can inverse (I'd probably still avoid that though).
No more grey, no more setting background color.
Added the beginnings of guidance to the display layer comments.