gnome-terminal-colors-solarized icon indicating copy to clipboard operation
gnome-terminal-colors-solarized copied to clipboard

Some text are invisible (same as background color)

Open tolgaek opened this issue 11 years ago • 29 comments

So because the 9th color in the palette is Base03 which is the same as the background, so now in a lot of my log outputs or test results and so on, that color is used..

The issue is that I can change that color in the palette but then my vim background color is that same color because of the fact that when you do background=dark in VIM, it seems to use that 9th color in the palette..

Any ideas on how I can handle both cases?

tolgaek avatar Sep 12 '13 14:09 tolgaek

Hello, Could you join a screenshot please ?

aruhier avatar Sep 12 '13 14:09 aruhier

Below is the output with hidden text invisible

Now in the exact same screen if I change 9th color of the palette, i get this; visible

tolgaek avatar Sep 12 '13 16:09 tolgaek

This is weird, it never happened on my vim...

Have you tried with a clean gnome-terminal profile ?

aruhier avatar Sep 12 '13 17:09 aruhier

I can confirm that the colors are the same. I have seen this when running javascript tests, and I change to the light background when it is a problem. But I'm sure we can get into the same situation for a light background as well.

I think this has to be changed where the colors are set, in dircolors.

sigurdga avatar Sep 12 '13 18:09 sigurdga

Well, BASE03 gets used both for the background and the 9th entry in the PALETTE.

PALETTE = [BASE02, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, BASE2,
           BASE03, ORANGE, BASE01, BASE00, BASE0, VIOLET, BASE1, BASE3]
SCHEMES = {'dark': {'background_color': BASE03,
                    'foreground_color': BASE0,
                    'bold_color': BASE1},

For me it's btw "gray" (from Zsh's $fg array) which is also mapped to "black".

@Anthony25 it's not about Vim here, but gnome-terminal.

It's also a problem with Terminator [1], which has a built-in scheme "Solarized black" (when using the Solarized palette also).

1: http://gnometerminator.blogspot.de/p/introduction.html

blueyed avatar Oct 09 '13 15:10 blueyed

I can confirm this and I'm seeing it in the same use case (running unit tests). What'd you change the color to for the second screenshot?

fearphage avatar Jan 17 '14 12:01 fearphage

This seems we will have problems like this with coloured outputs using solarized. https://github.com/altercation/solarized/issues/220 describes several tools outputting grey and giving problems like this. Solarized may need a fix that will be hard to implement because of the use grey background. In the mentioned issue, you can find links to a fork that may work for you.

sigurdga avatar Feb 10 '14 08:02 sigurdga

Fixed with ff1e66442c8b83ed52c31b788be042c8baf8e62, thanks to @absynce.

aruhier avatar Jun 03 '14 09:06 aruhier

Was the intent to change the background color? My background is all washed out now. i.e. BASE01.

armyofzin avatar Jun 11 '14 03:06 armyofzin

I didn't see the difference that's why I pulled this commit because it seems to fix the invisible text without changing anything. If you prefered the old color, I revert the commit.

aruhier avatar Jun 11 '14 07:06 aruhier

The old color is the correct color. The invisible output is a bug between the other libs. (Solarized has too few colors for the other tools… or something like that)

sigurdga avatar Jun 11 '14 08:06 sigurdga

Okay I see, sorry about that. I'm reverting the commit.

aruhier avatar Jun 11 '14 09:06 aruhier

This is a pretty well known bug in the Solarized palette. I found a way to fix it but it breaks compatibility with any programs like vim that have a Solarized colorscheme. Here's my writeup on the fix. Sorry for the shameless self-plug, but as far as I can tell nobody has come up with another solution yet.

jmatth avatar Jun 18 '14 22:06 jmatth

FWIW, here is a simple script to output a table of all colors, which might help to address this issue: https://github.com/blueyed/dotfiles/blob/master/usr/bin/colors-table You can use it as colors-table - to get all colors without / on transparent background.

blueyed avatar Jun 18 '14 23:06 blueyed

Here's a comparison with upstream solarized, solarized with base03 changed (like how everyone tries to fix it), the problem that causes in vim, and vim with the transparency fix applied:

solarized_graphic

jmatth avatar Jun 19 '14 02:06 jmatth

gnome-terminal allows setting a different text and background color (which must not be in the palette).

Can't this be used? The palette would stay the same (and no changes to the Vim (and other apps') colorscheme would be needed), but gnome-terminal would use a slightly different background color.

Also, please re-open this issue.

blueyed avatar Jul 02 '14 13:07 blueyed

Well, this script respects the solarized colorsheme, and I have exactly the same problem with urxvt (that I have solved in installing the solarized theme for vim). The question is : do you prefer having a terminal with the solarized colors and a vim which needs the solarized theme, or a terminal with a different background than the solarized one, with a vim less broken (but still uglier than with the solarized vim theme) ?

aruhier avatar Jul 02 '14 17:07 aruhier

I am using the solarized theme for Vim (cherry-picked fixes from other forks; https://github.com/blueyed/vim-colors-solarized), and it appears to work fine with gnome-terminal-colors-solarized. I am only trying to improve the issue, where you might end up with invisible text in the terminal. Having a different background would work around this. It should not affect the Vim colorscheme, because this would use the (unchanged) palette.

blueyed avatar Jul 03 '14 14:07 blueyed

Which color do you suggest for the background ?

aruhier avatar Jul 16 '14 19:07 aruhier

I have both the vim solarized theme and the gnome-terminal solarized theme. There are no adverse affects to using this combination that I see with the changes I made in ff1e664. @armyofzin @sigurdga, what combination of themes/configurations causes issues for you?

absynce avatar Jul 16 '14 19:07 absynce

Hi, I got a similar problem. I installed this theme yesterday. I am using dark theme with dircolors.ansi-dark. In htop program, the percentage numbers are invisible when this theme profile is selected in gnome-terminal. When I change the profile to the default one, they become visible again.

sgon00 avatar Aug 02 '14 04:08 sgon00

Here is the screenshot:

sgon00 avatar Aug 02 '14 04:08 sgon00

Hello @sgon00, until we find a replacement color for the background, you can switch on the "black night" theme in htop.

aruhier avatar Aug 02 '14 10:08 aruhier

Hello @Anthony25, thanks a lot for the suggestion. I never know I can change htop color theme before. Just found out in F2 setup menu of htop. The background color is cool to me. I am using solarized theme everywhere. Thanks.

sgon00 avatar Aug 02 '14 10:08 sgon00

I like it too, the problem is that 2 colors are identical, and some soft like htop or vim are using these 2 colors to contrast. It's an upstream bug, directly linked with the official solarized color-scheme...

aruhier avatar Aug 02 '14 11:08 aruhier

@jmatth your fix worked for me so far. Thanks a lot!

anjosh-zz avatar Dec 05 '15 03:12 anjosh-zz

The text will be visible if you set iterm2's contrast a little bit higher. Go to Preferences > Profiles > Colors > Minimum contrast and set the slider a little bit to the right and you will see the invisible text. (Also see https://www.iterm2.com/documentation-one-page.html, search for "contrast".)

Even tho not a solution to the actual problem this might help most people who run into the same problem. ;)

j-hannes avatar Jan 06 '16 09:01 j-hannes

JFI: while I am not using gnome-terminal for a while already, I've switched to using base16 recently, and it has profiles for gnome-terminal, too: https://github.com/chriskempson/base16-gnome-terminal

Together with https://github.com/chriskempson/base16-shell (and a modified colorscheme for Vim (https://github.com/blueyed/vim-colors-solarized) this seems to be a good fix for me. I am using rxvt-unicode / urxvt with the Xresources settings from base16.

blueyed avatar Jan 06 '16 16:01 blueyed

@anjosh @jmatth I read the article but it's a bit too hard for me. What exactly can I do to see light gray in my Ubuntu 18.04 Gnome Terminal?

exarus avatar Apr 29 '18 17:04 exarus