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

default theme is tough to read on a white background #7

Open
matthewmueller opened this issue Jun 1, 2014 · 6 comments
Open

default theme is tough to read on a white background #7

matthewmueller opened this issue Jun 1, 2014 · 6 comments

Comments

@matthewmueller
Copy link

originally from: matthewmueller/better-error#1

@AriaMinaei
Copy link
Owner

Oops, this one slipped! Sorry :)

I just looked at the screenshot. Are we sure that's what's supposed to happen? I assume terminals have themes and each theme would set an alternative color for every default color (like, when BG is in white, then white text would appear as black).

This is what the light theme looks like in my console (ConEmu):
untitled-1

@matthewmueller
Copy link
Author

hm... i wonder if there is a way to detect the terminal background. I can confirm that the default theme is tough to read on the default terminal on mac.

default

@AriaMinaei
Copy link
Owner

i wonder if there is a way to detect the terminal background.

It looks like there is.

I can confirm that the default theme is tough to read on the default terminal on mac.

It's probably easy for us to make a theme for white background, but that would mean that every package that uses RenderKid should include an alternative theme too, or simply ignore light colors altogether. I wonder if there is another way to ensure compatibility with light bg.

@jholster
Copy link

jholster commented May 6, 2016

OS X Terminal has configurable colors. The default theme ("Basic") maps ANSI "bright white" to very light grey, which is barely visible on white (default) background. User can fix the issue by changing "bright white" to more dark in Terminal settings.

Because terminals can have any combination of default foreground / background colors, I don't think universal "safe" combinations really exist, so it's up to the terminal program to map colors in readable way.

So, althought the issue is arguably OS X Terminal's fault, it would be nice if pretty-error used a combination of colors that plays nice with most popular terminals (OS X Terminal being one of them?), e.g. replace ANSI "bright white" with ANSI "default foreground color".

@victoriastuart
Copy link

victoriastuart commented Feb 7, 2017

Terminal:

image

Manually-selected region:

image

... Konsole terminal in Arch Linux ... Honestly, for me having readable, simplified error messages trumps "prettified" output.

@seansfkelley
Copy link

This is still a problem, and I don't want to reassign bright-white in my terminal because that would break other styles that provide their own background and want to set the foreground to bright white to compensate. Instead, as a workaround, you can unset the color, which seems to work nicely since the theme is designed for black backgrounds and you'll get whatever the appropriate default text color you've set is:

{
  'pretty-error > header > message': {
    color: 'none',
  },
}

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

No branches or pull requests

5 participants