altercation / solarized

precision color scheme for multiple applications (terminal, vim, etc.) with both dark/light modes
http://ethanschoonover.com/solarized
MIT License
15.82k stars 3.52k forks source link

Color fix needed? #220

Open hemanth opened 12 years ago

hemanth commented 12 years ago

color

That's how it looks in my terminal, can read the text only after highlighting them!

The color of the text is gray!

ghost commented 10 years ago

@cuviper I’m more than willing to merge a fix to another one of the themes in my fork if that helps others. I mostly just fixed what I use because I’m selfish like that :smile:

cuviper commented 10 years ago

Right, I use gnome-terminal on Linux, mintty and putty on Windows, so your iTerm2 change doesn't help me. Your "selfish" choice is fine, no worries. I think the way I'm contemplating won't be compatible with what you've done, but if I find otherwise, I'll absolutely send a pull request.

ghost commented 10 years ago

@cuviper there’s a gnome-terminal theme in the repo? I don’t see it at first glance.

cuviper commented 10 years ago

No, it's over at sigurdga/gnome-terminal-colors-solarized, although GNOME 3.12 actually has the theme built in now. Mintty is also external at mavnn/mintty-colors-solarized.

That's part of what makes this tricky to change, since the palette is in use elsewhere now. You've brightened up base03 a lot, if only in iTerm2, but nobody else calling themselves "solarized" is doing that. I'm proposing to swap how base03 and base02 map to black and brblack, which will have the same problem with adoption.

ghost commented 10 years ago

@cuviper I can’t help you much with the gnome-terminal theme since it’s on another repo. I just doubled checked, and as far as I can tell from wikipedia, Ansi 8 is bright black and in all the dark iTerm2 themes I check this color is always a gray of some kind. In the official repo here, that color is actually set as the same color as the background, which is a very dark blue. In my fork, I changed Ansi 8 back to a gray, which seemed to make sense.

But maybe you’re right, and I should have left Ansi 8 as it was and changed the background color instead to a "lighter" dark blue?

https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/schemes/Blazer.itermcolors defines Ansi 8 as a gray, while https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/schemes/Tomorrow%20Night.itermcolors defines it as black. I’m not sure which one of those themes is more similar to solarized.

ghost commented 10 years ago

I’m thinking tomorrow night blue might be the most similar:

https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/schemes/Tomorrow%20Night%20Blue.itermcolors

It sets Ansi 8 to black, so maybe you’re right. I’m just not sure which color I should set the background in that case.

cuviper commented 10 years ago

Right, the main problem is that the background base03 color is mapped to Ansi 8 (brblack), so text of that color is invisible. I want to map base03 to Ansi 0 (black) and switch base02 to Ansi 8. So anything that writes Ansi 8 text will be a little more visible, at least.

cuviper commented 10 years ago

Tomorrow Night Blue doesn't look like it distinguishes bold/bright colors at all! But I guess it can get away with that when the background is totally different. That would be a large departure to do that for solarized though.

benebun commented 10 years ago

Have the same problem as @cuviper (gnome-terminal, htop, grunt), so a workaround/fix for gnome-terminal would be great!

ghost commented 10 years ago

@benebun I think you should start by opening an issue or a pull request at https://github.com/sigurdga/gnome-terminal-colors-solarized/issues =

cuviper commented 10 years ago

@benebun If you want to follow @hydrozen's lead, just go into gnome-terminal Profile Preferences, Colors, and brighten up Palette Entry 9 (first box on the second row). He made it pretty close to base0 (RGB 839496) if I read correctly, but I think I'd keep it between base03 and base01, something like RGB 415257.

cuviper commented 10 years ago

Picture time!

Here's the status quo, where bright black is invisible on the background: solarized-current

... and that's a problem when many programs expect a visible dark gray there.

Here's what it looks like if I just increase Ansi 8 to RGB 415257: solarized-new-ansi8

But that leaves the background color outside of the 16 Ansi colors, which might be a problem for themes trying to set their various colors this way. For example, the normal foreground is part of the set at Ansi 12, and I think the dark background really ought to be Ansi 0.

So here's what it looks like if I set the background as Ansi 0: solarized-new-ansi8-and-bg-ansi0

So that's effectively base03 color unchanged but moved to Ansi 0 (black), and base02 color changed to 415257 and moved to Ansi 8 (brblack). A lot of themes would only need to update base02, and those which reference Ansi colors just swap their references to 0/8, black/brblack.

Light for good measure: solarized-new-light

Thoughts?

rdlugosz commented 10 years ago

I stumbled upon the HUSL color space recently and played a bit with their random colorscheme generator. Very interesting in that it aims to preserve a similar level of contrast across different hue values. The results are very pleasing to look at & in many ways reminiscent of the idea of Solarized.

I was thinking about ways to use this to solve the issue we've been having with Solarized, and that led me back to reading the Solarized homepage. If you look at the first graphic that lays out the various colors, you'll note that base03 (brblack) and base02 (black) are intended for use as background colors. So it would seem that the real problem we have is that Solarized is meant to be used in a very specific way and many terminal apps don't play by those rules.

@cuviper's experiments above show some alternatives, but changing the background to 0 is definitely outside of what Ethan was going for with Solarized. He has very particular specifications for the relationship between background and foreground: in the case of a dark background colorscheme, the normal relationship for background and body text is base03:base0

All this to say: instead of trying to change Solarized, maybe we should consider creating a new theme with Solarized-influenced tones using HUSL and the base-16 generator tool?

Also, this thread could go down in history as being one of the greatest yak shaves in history. :)

cuviper commented 10 years ago

FWIW, while I'm moving the background to the Ansi 0 slot, I'm not changing it's value, so the normal background:foreground ratio is unchanged, still base03:base0. But brightening base02 does affect the highlight ratio of base02:base1, and after using it a few days, I'm not sure I like that.

I still think swapping base03 into Ansi 0 and base02 into Ansi 8 is a good move (updating various themes to find their bases in the new Ansi indexes), but I'm going to try it a few days without also brightening base02. Basically back to my original idea. Programs which write text in brblack (as base02) are still going to be very hard to read, as that's very little contrast over the base03 background, but at least it's not invisible.

cuviper commented 10 years ago

Interesting, I found that base16 puts the background in Ansi 0 too, and there's a solarized variant (preview). But the gnome-terminal theme isn't actually using the #073642 color -- a lot of the bright Ansi colors are repeats of the lower set, instead of the way solarized has grayish colors in those slots. I guess that keeps it so terminal bold doesn't lose color, which is nice. Then there's base16-shell to extend the full color set.

Since the base16 project looks active, that might be a better place for solarized fans to go.

rdlugosz commented 10 years ago

Since the base16 project looks active, that might be a better place for solarized fans to go.

It does seem to be an active project & honestly I think most of the variants look rather nice—I've been working for most of the day in base16-default with a dark background. Might be a keeper.

ghost commented 10 years ago

@cuviper thanks, I’ll try it out. The sublime text theme is much more colorful, maybe too much. iTerm2 theme looks rather nice though and I still have to try the base16 vim theme with it.

ghost commented 10 years ago

The base16-solarized.vim theme doesn’t seem to work very well with the base16 solarized theme.

screen shot 2014-05-07 at 6 28 00 pm

cuviper commented 10 years ago

It needs the base16-shell and then let base16colorspace=256 as described at the end of the base16-vim README.

That said, I don't love the colorscheme as much as solarized's. It's generated with a template for all base16 themes, but I don't think one-size-fits-all very well in this case. I may try to map altercation's theme to base16's color layout instead. (which will still require working base16-shell.)

cuviper commented 10 years ago

Ok, here's my fork of the vim theme to map to base16: https://github.com/cuviper/vim-colors-solarized

Enable base16-shell, then let g:solarized_base16=1 before colorscheme solarized. It should look exactly as vim looks in normal solarized terminals.

ghost commented 10 years ago

Cool, will have a look. And yeah, I had not checked the README of the vim theme, looks fine once I setup base16-shell.

ahmedelgabri commented 10 years ago

I managed to find a solution (at least for my case #290 ) which is changing the contrast in iTerm2 from the minimum contrast slider at the bottom & now I can see all the text. Maybe not the best the solution but it works in my case & might help others too. screen shot 2014-05-30 at 9 52 14 am

ghost commented 10 years ago

similar issue with terminator however it appears to be a color scheme issue rather than specific to terminator.

https://github.com/ghuntley/terminator-solarized/issues/5

anarcat commented 10 years ago

@altercation in case you're still looking for easy ways to reproduce this, "iptraf" and "htop" are prime candidates.

Here's htop in xterm with the default color scheme:

2014071011 17 45

Here's how it looks in a non-solarized gnome-terminal color scheme:

image

(The color settings for gnome-terminal were: "Grey on black", "XTerm palette".)

It's really just one of those colors that fails because it matches the background.

And here's iptraf:

image

Here's how iptraf looks in gnome-terminal:

image

iptraf isn't so bad, we can actually read what's there, but barely.

Also, it's fairly simple to use the "monochrome" color schemes in both htop and iptraf, although at the cost of reduced functionality for htop. For htop, the "Black night" color theme actually works nicely.

So is this something that will be fixed in solarized, or should we use the workarounds provided by those applications?

aruhier commented 10 years ago

Hello, For gnome-terminal-colors-solarized I have to deal with the same problem : https://github.com/Anthony25/gnome-terminal-colors-solarized/issues/32

Users suggest to change the terminal background, without changing the palette. The problem is to find a color close to the actual background without giving an impression of "washed out" color...

djensen47 commented 10 years ago

This is also a problem in bunyan see: trentm/bunyan#160

lukecyca commented 10 years ago

+1 for @ahmedelgabri's simple hack of turning up the minimum contrast a bit. It's not "true" to the original colours, but it's a good last-resort fix for any unfortunate colour selections in the wild.

djensen47 commented 10 years ago

So this issue has propagated to at least 10 other issues in other repos. Seems like a clear indication to me that a compromise and a fix should be made.

iamolivinius commented 10 years ago

:+1:

oryband commented 10 years ago

anyone had any progress on this?

davidfou commented 10 years ago

I use @hydrozen color sheme (see hydrozen/solarized repo) and I have no more problem

iamolivinius commented 10 years ago

I like base16-flat-dark http://chriskempson.github.io/base16/#flat

ghost commented 10 years ago

@oryband I’m using the solarized theme from base16 nowadays.

anarcat commented 10 years ago

neat. i'll be trying out the base16 theme for a while too.

A commented 9 years ago

+1 I have similar issue with mocha and gulp

hans-d commented 9 years ago

+1

isqua commented 9 years ago

+1

cyjake commented 9 years ago

+1

But after 30min of reading these related issues I think it might be the time to ditch Solarized Darko for iTem2.

cyjake commented 9 years ago

https://github.com/chriskempson/base16-iterm2

calfzhou commented 9 years ago

+1

nickserv commented 9 years ago

Does the base16 solarized dark theme have the same issues?

cuviper commented 9 years ago

It's fine with base16 because that makes use of extended colors. You have to do a little more work with base16-shell to get everything set up.

nickserv commented 9 years ago

Cool, thanks for the quick answer.

zevaverbach commented 9 years ago

@hydrozen 👍👍👍

eugeneglova commented 9 years ago

+1 contrast fix

rwxrob commented 9 years ago

It is worth noting that Ubuntu 15.04 now officially includes Solarized in the standard selections for gnome-terminal color schemes. If you use Chalk or other themes that are not Solarized compatible you are choosing to be incompatible with a standard Ubuntu theme at this point. My experience has been only Chalk applications are subject to this issue. I have never encountered even an old app that uses terminal colors that is as broken as most Chalk applications.

iamolivinius commented 9 years ago

htop Am 24.08.2015 4:40 nachm. schrieb "Rob Muhlestein" <notifications@github.com

:

It is worth noting that Ubuntu 15.04 now officially includes Solarized in the standard selections for gnome-terminal color schemes. If you use Chalk or other themes that are not Solarized compatible you are choosing to be incompatible with a standard Ubuntu theme at this point. My experience has been only Chalk applications are subject to this issue. I have never encountered even an old app that uses terminal colors that is as broken as most Chalk applications.

— Reply to this email directly or view it on GitHub https://github.com/altercation/solarized/issues/220#issuecomment-134229185 .

rwxrob commented 9 years ago

Thanks @iamolivinius haven't been using htop (mostly because I believe in teaching students tools that have more ubiquity, like top and sar, etc.) but this is indeed unfortunate. But I certainly won't be missing it.

mrozbarry commented 9 years ago

As a heads up to people using iTerm2 that have this issue and don't want to modify the theme, you can bump up the contrast about 10-20% in your terminal colour profile settings, and it made the invisible text readable without making a mess of the other colours. It does get a little brighter looking, but it's reasonable.

lvarayut commented 9 years ago

+1 I'm having the same issue.