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

Code in the solarized color theme is not displayed correctly #96

Closed
willprice opened this issue Apr 15, 2014 · 4 comments
Closed

Code in the solarized color theme is not displayed correctly #96

willprice opened this issue Apr 15, 2014 · 4 comments

Comments

@willprice
Copy link

Hi,

I've been following along learnyounode and have found that it doesn't play nicely with terminals that use the popular solarized color theme.

2014-04-15-172922_245x190_scrot

The theme can be found here

Any chance a modification can fix this? Mocha also has this problem with it's reporters, but the maintainer is unwilling to fix this as he says it's a solarized issue.

Relevant threads:
altercation/solarized#220
mochajs/mocha#802
yeoman/yeoman#386

Not sure whether you consider this something to fix, or not. At least if others experience the same problem they can try and modify the solarized theme!

@rvagg
Copy link
Contributor

rvagg commented Apr 16, 2014

I think down below msee we're using cardinal to do the syntax colouring now so I might pull in @thlorenz here to see if he has any thoughts or experience with colour schemes that work across platforms. The real problem we have here is that we'll end up in a wac-a-mole situation where we'll change it to suit solarized and it'll go wonky on some other terminal theme or even the default theme for some major platform! My guess is that the Mocha team won't fix it for exactly this reason (plus I believe they're also particularly concerned about presentation and don't want to make things ugly..).

@willprice
Copy link
Author

Hi Rod,

You raise a very good point re wac-a-mole. I'm inclined to agree with you that in fact it is solarized that is broken. I get the impression that colors in terminal emulators are a nightmare and it's compromises across the board.

Feel free to close the issue, I just thought it'd be useful to note in case someone else faces the same problem :)

@thlorenz
Copy link

FWIW cardinal allows you to specify custom themes, currently two are builtin.

You can override the them via opts, but you'd probably have to adapt msee to pass those through.

cardinal itself uses ansicolors to add the escape codes that generate the colors, which are ANSI/VT100 compat and therefore should pretty much work anywhere (except maybe windows).

AFAIK this standard is as much of a common denominator as you're gonna get. As you can see it's only 16 colors (actually 8 with 2 different brightnesses). Most terminals support more colors, but I tried to keep things simple to make things work in most environments.

As a matter of fact bower :( uses cardinal to highlight json files and I haven't heard about any issues. I'm sure it's used in lots of environments.

npm uses ansicolors to highlight out of date dependencies, and same here, didn't hear about any issues.

@shanmukhateja
Copy link
Contributor

This issue can be marked as closed due to inactivity. Feel free to reopen the issue if you have something to contribute to it.

@feross feross closed this as completed Sep 15, 2019
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