solarized icon indicating copy to clipboard operation
solarized copied to clipboard

Color fix needed?

Open hemanth opened this issue 13 years ago • 134 comments

color

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

The color of the text is gray!

hemanth avatar Sep 12 '12 01:09 hemanth

This is the grey color that is turned invisible: \x1B[90m

sindresorhus avatar Sep 12 '12 07:09 sindresorhus

@altercation @TrevorBramble bump. A lot of people are experiencing this bug...

sindresorhus avatar Oct 08 '12 20:10 sindresorhus

What's generating this prompt?

(Yes, this is a significant issue. I want to test and repo)

altercation avatar Oct 08 '12 21:10 altercation

@altercation node-prompt, see here.

Also see the referenced issues above.

That text is invisible because the authors of Solarized Dark made the "bright black" color the same color as the background. Whoops. Also, for some reason, they made almost all of the "bright" colors not lighter, but darker than their "normal" counterparts.

sindresorhus avatar Oct 08 '12 21:10 sindresorhus

So it's clear, this is not a "whoops" at all, but rather a very intentional and considered compromise based on the shitstorm of conflicting standards, expectations and legacy applications that is terminal emulation.

While a change is possible, and the information about which applications and programs suffer from issues like this is very helpful, it isn't going to happen immediately as any change is going to break the way something works.

This is probably the number one concern I have (the bright black issue) and I will only make a change once I'm certain it's the absolute best option.

altercation avatar Oct 09 '12 01:10 altercation

I was also experiencing this issue with yeoman, not sure on which side the bug should be fixed, but the workaround I found is to use this my Xresources

#define hack_color #1c1c1c *color8: hack_color

Changing the value of color8 to hack_color (it used to be set to !!base03 #002b36)

hellais avatar Oct 17 '12 01:10 hellais

bump

satazor avatar Nov 12 '12 01:11 satazor

I'm having the issue with the output from an ExpressJS application.

ghost avatar Nov 23 '12 20:11 ghost

Just ran into (what I believe is) this issue with yeoman. Here’s what the yeoman usage/help command looks like in iTerm2 with Solarized Dark:

Screen Shot 2013-01-10 at 5 07 30 PM

…and with Solarized Light:

Screen Shot 2013-01-10 at 5 07 09 PM

cobyism avatar Jan 10 '13 17:01 cobyism

Another example is the usage command of bower.

Screen Shot 2013-01-10 at 5 22 44 PM Screen Shot 2013-01-10 at 5 23 13 PM

cobyism avatar Jan 10 '13 17:01 cobyism

What is the status of this? I just installed Yeoman 0.9.6 and large chunks of text are invisible in iTerm 2 with solarized dark. I'd let it go but:

  1. My setup is far from uncommon. I'd say most OS X devs I know use iTerm2 and Solarized.
  2. By definition Yeoman is a tool to make life easier, so I'd hope that fixing things like this might be a bit of a priority.

mleveck avatar Jan 22 '13 00:01 mleveck

@mleveck You can look into the version in my pull request. Yeoman looks better with it...

Screen Shot 2013-01-21 at 7 59 14 PM

ghost avatar Jan 22 '13 01:01 ghost

Related problem in Mocha too - https://github.com/visionmedia/mocha/issues/802

necolas avatar Apr 29 '13 20:04 necolas

:/

sindresorhus avatar Apr 29 '13 20:04 sindresorhus

Other themes give me the same problems such as Tomorrow Night Bright at https://github.com/chriskempson/tomorrow-theme. Really annoying.

ghost avatar Apr 29 '13 20:04 ghost

@altercation can you please look into this. Seems bad to advocate that people to abandon solarized but... 6 months in, we're just about at that point.

paulirish avatar Apr 30 '13 04:04 paulirish

@paulirish Sure. I'll take a look.

altercation avatar Apr 30 '13 04:04 altercation

This problem is also affecting Express: https://github.com/visionmedia/express/issues/1700

Most of the popular front-end tools have been or are affected by this long-standing bug.

necolas avatar Jul 25 '13 17:07 necolas

This is just ridiculous...

sindresorhus avatar Jul 25 '13 18:07 sindresorhus

I know it’s not ideal, and nor maybe the correct solution, but some people have been getting good results from my fork at https://github.com/hydrozen/solarized. I tweaked the iTerm2 theme and the vim theme and it seems to work well enough for me.

ghost avatar Jul 25 '13 18:07 ghost

+1 for @hydrozen's fork. I'm using it successfully, but only with iTerm2.

henrahmagix avatar Jul 26 '13 01:07 henrahmagix

Another +1 for @hydrozen's fork and iTerm 2 usage. Works quite well, just set it up now. :+1:

brianarn avatar Jul 29 '13 14:07 brianarn

As per https://github.com/altercation/solarized/issues/164, this is easly fixed by uping the contrast in iterm2 (I found a about a third from the left to be optimal)

mbrevda avatar Sep 08 '13 16:09 mbrevda

The issue is that there is no way to render a low-intensity, neutral colour on Solarized in a way that also works with default terminal colour schemes. Here are the some schemes for comparison:

#!/usr/bin/env ruby

puts "running in an #{ENV['TERM']} (#{ENV['TERM_PROGRAM']})"

[2, 30, 37, 90, 97].each {|code|
  puts "using \\e[#{code}m: \e[#{code}mbam\e[0m"
}

A textmode linux pty: linux pty

A basic xterm's default scheme: xterm

OS X Terminal.app's default scheme: Terminal.app

Solarized light: Solarized light

Solarized dark: Solarized dark

                       linux pty   xterm     Terminal.app   solarized light  solarized dark
"\e[2m" low int.       -           -         low int.       -                -
"\e[30m" black         invisible   -         -              grey (*)         v faint
"\e[37m" white         -           white     white          white            white
"\e[90m" bright black  -           grey (*)  grey (*)       grey (*)         invisible

Notes:

  • The '-' above means unchanged, i.e. the standard foreground colour for that scheme.
  • 'low int' is an ANSI code which renders the given colour at a lower intensity. It would be useful for our purposes, but it's not widely supported.
  • 'white' isn't always quite the same as the background white, but it's close enough that text rendered in white isn't readable.

As you can see, you get grey by using "bright black", because that's what the standard colour schemes support. (These are the terminals I have at hand, but I've seen this borne out over others too.) Solarized aside, everything correctly renders ansi 90m as grey, except a linux pty, which doesn't change colour.

(The only way to get grey on a linux pty is to render bold black text on a black background, 1;30;40m. This changes the background colour on a non-black terminal and results in invisible text in most xterm-like emulators. Can't win 'em all!)

Solarized dark's "bright black", though, is the same as the background colour. I'd be interested to hear the reasoning behind this choice, but in the meantime, in my opinion it's incorrect and ripe for fixing. Raising Solarized dark's 'bright black' slightly would do the trick.

I use a tweaked solarized and have bright black set to R30,G100,B118 which looks good to my eyes: Solarized ben_h

benhoskings avatar Sep 25 '13 14:09 benhoskings

Oops, I made a little mistake above :) There's no need to render a background behind "bold black" text on a linux PTY, hence the 1;30;40m that I quoted can be simplified to 1;30m.

Without the black background, the text is visible on all terminals, but it doesn't render consistently enough to be useable for grey. A linux pty will render it in grey, but most standard themes will render it as bold, black text. (Solarized dark renders it in a very dark grey, too dark to be easily read.)

(I think "bright black" \e[90m is the right choice for grey regardless of this.)

benhoskings avatar Sep 29 '13 10:09 benhoskings

+1

gingermusketeer avatar Jan 13 '14 08:01 gingermusketeer

OMG @mbrevda the contrast setting in iTerm2 works perfect! Thank you!!!! Thank you!!!!

sukima avatar Jan 23 '14 03:01 sukima

I’m still not sure the contrast setting really is the correct solution, I don’t see why only this theme would be affected.

ghost avatar Jan 30 '14 02:01 ghost

+1 for finding some kind of solution to this... @hydrozen's alternate schemes work great in terminal, but the Vim colorscheme doesn't play nice in macvim. May have to use the contrast fix, but I don't like that it impacts all of the colors.

rdlugosz avatar Feb 06 '14 20:02 rdlugosz

Contrast setting is definitely not the correct solution because it breaks the vim powerline. @hydrozen theme works perfectly (I don't use macvim) and now everything works perfectly! Many thanks

davidfou avatar Feb 25 '14 15:02 davidfou