jacoborus / tender.vim

A 24bit colorscheme for Vim, Airline and Lightline
MIT License
1.14k stars 83 forks source link

Background washed out. #15

Closed pnunn closed 8 years ago

pnunn commented 8 years ago

When I turn on this color scheme, the whole window gets washed out. See the attached screen shot of side by side tmux windows. One without vim, the other with vim open

vim

Any ideas how to fix the contrast?

hugomd commented 8 years ago

@pnunn Could you post your .vimrc?

jacoborus commented 8 years ago

@pnunn I'm afraid this is a problem that you will have with any grey background over a transparent terminal. Try this commands in vim and let me know if it solves the problem please:

:hi Normal guifg=#eeeeee ctermfg=255 guibg=#000000 ctermbg=0 gui=NONE cterm=NONE
:hi Visual guifg=NONE ctermfg=NONE guibg=#282828 ctermbg=235 gui=NONE cterm=NONE
pnunn commented 8 years ago

Thanks guys. @jacoborus these actually made the situation worse. You are correct in that I am using a semi transparent terminal (iterm on mac).

pnunn commented 8 years ago

I've been playing around with this. I get the same effect in HyperTerm (which is opaque black background) and en iTerm2 when I turn off the transparency. Just incase I'm doing something wrong, attached is my .vimrc vimrc.txt (file name changed so it would upload).

jacoborus commented 8 years ago

@pnunn what "Background washed out" means? Can you post a screenshot with a solid background?

jacoborus commented 8 years ago

@pnunn your vim colorscheme looks different to my screenshots because you need to enable true colors in your terminal and vim config. Maybe this comment or this gist can help you

pnunn commented 8 years ago

I have added the two lines in the comment and it is now closer (screen shot with black, opaque background attached). You can still see the grayness but it is better.

vim2

I'll keep digging in the gist and see if I can turn up anything.

pnunn commented 8 years ago

OK, have it working like a champ now.. followed this page (without replacing tmux as it was already at 2.2)

https://chris.chowie.net/2015/04/19/True-colour-with-neovim-tmux-and-iterm2/

pnunn commented 8 years ago

Nope.. spoke too soon. Wasn't showing up because Vundle wasn't running so neither was tender.vim.

Just got Vundle working and neovim is doing the same thing sigh.

jacoborus commented 8 years ago

Ok, let's begin again step by step.

  1. What version of vim are you running? 24bit colorschemes require neovim or vim higher than v7.4.1770
  2. Did you enable true colors in vim/neovim? nvim: set termguicolors , vim v7.4.1770 or newer (Vim 8 doesn't need this): set guicolors
  3. Does vim show the right colors while running alone in a opaque terminal without tmux?
pnunn commented 8 years ago

vim, 7.4.889 neovim, 0.1.6-dev I'm trying to upgrade to vim 8 at the moment.

set termguicolors made no change set guicolors was invalid option for both vim and neovim tmux does not seem to have any impact. I get the same thing with tmux, no tmux (both on iTerm2) and HyperTerm no tmux.

Peter.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 16 September 2016 at 9:03 PM

Ok, let's begin again step by step.

  1. What version of vim are you running? Running true colors requires neovim or vim higher than v7.4.1770
  2. Did you enable true colors in vim/neovim? nvim: |set termguicolors| , vim v7.4.1770 or newer (Vim 8 doesn't need this): |set guicolors|
  3. Does vim show the right colors while running alone in the terminal (without tmux)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247574279, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_IS62O4qZau7FAKDqHtxgFHilVkTCKks5qqnd5gaJpZM4J91oo.

jacoborus commented 8 years ago

I think the problem is in your terminal, try:

awk 'BEGIN{
    s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
    for (colnum = 0; colnum<77; colnum++) {
        r = 255-(colnum*255/76);
        g = (colnum*510/76);
        b = (colnum*255/76);
        if (g>255) g = 510-g;
        printf "\033[48;2;%d;%d;%dm", r,g,b;
        printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
        printf "%s\033[0m", substr(s,colnum+1,1);
    }
    printf "\n";
}'

It should look like this: selection_074

pnunn commented 8 years ago

Yep, that's what it looks like both with and without tmux :(

P.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 16 September 2016 at 9:50 PM

I think the problem is in your terminal, try:

awk 'BEGIN{ s="/\/\/\/\/\"; s=s s s s s s s s; for (colnum = 0; colnum<77; colnum++) { r = 255-(colnum255/76); g = (colnum510/76); b = (colnum*255/76); if (g>255) g = 510-g; printf "\033[48;2;%d;%d;%dm", r,g,b; printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; printf "%s\033[0m", substr(s,colnum+1,1); } printf "\n"; }'

It should look like this: selection_074 https://cloud.githubusercontent.com/assets/829859/18584977/8ae4c034-7c14-11e6-92e1-894cca3eddaa.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247581730, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_IS1atgChI60Gmeh_BQV61TiNuFtjDks5qqoKbgaJpZM4J91oo.

jacoborus commented 8 years ago

I'm running out of ideas... can you try another 24 bit colorscheme and see what happens?

pnunn commented 8 years ago

Um.. sure, what would you suggest :) (Don't know a lot about this). P.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 16 September 2016 at 10:14 PM

I'm running out of ideas... can you try another 24 bit colorscheme and see what happens?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247585781, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_IS7lqsIjTzkZSuigUfLI4Bx5Bb06Bks5qqohBgaJpZM4J91oo.

jacoborus commented 8 years ago

Try badwolf and compare the result with the screenshots

pnunn commented 8 years ago

badwolf does the same thing. Colors seem to be OK, but a slightly grey background on the whole of nvim and grey background on each character in vim.

Peter.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 16 September 2016 at 11:28 PM

Try badwolf https://github.com/sjl/badwolf and compare the result with the screenshots

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247600418, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_IS1MyNnc1C3bPMKWUyN2PQQVt7QW8ks5qqpmJgaJpZM4J91oo.

pnunn commented 8 years ago

Sorry I was wrong, I didn't turn on badwolf, just enabled it, badwolf works fine.

P.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 16 September 2016 at 11:28 PM

Try badwolf https://github.com/sjl/badwolf and compare the result with the screenshots

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247600418, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_IS1MyNnc1C3bPMKWUyN2PQQVt7QW8ks5qqpmJgaJpZM4J91oo.

jacoborus commented 8 years ago

hey @pnunn , did the upgrade to vim8 go well?

pnunn commented 8 years ago

Hi Jacobo,

upgrade to 8 went fine, still problems with the color scheme though. Several others are working without the effect I'm seeing from tender (the suggested badwolf for example). It is interesting that badwolf has
the effect on text in the file but I think that's by design. Not on every line.

Hope you had a good weekend.

P.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 19 September 2016 at 9:27 AM

hey @pnunn https://github.com/pnunn , did the upgrade to vim8 go well?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247890282, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_ISwkNeScgdAwANZUkqmFdv2HsuC7uks5qrcjzgaJpZM4J91oo.

jacoborus commented 8 years ago

Ok, the last try: I made a clean vim8 install and found the same problem you have, after some changes in tender code it worked with this .vimrc:

set nocompatible
filetype off
set termguicolors
syntax enable
colorscheme tender
pnunn commented 8 years ago

Lol.. thanks SO much for the efforts Jacobo. Still no joy. I've payed around with these setting and can certainly change the look (some much more subtle than others) but I still get the background effect.

Peter.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

Jacobo Tabernero mailto:notifications@github.com 19 September 2016 at 11:04 PM

Ok, the last try: I made a clean vim8 install and found the same problem you have, after some changes in tender code it worked with this |.vimrc|:

set nocompatible filetype off set termguicolors syntax enable colorscheme tender

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jacoborus/tender.vim/issues/15#issuecomment-247987268, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_ISyJb_2z6N3PxKLkjEtlHH5DM2oHDks5qrohygaJpZM4J91oo.

AlessandroYorba commented 8 years ago

@pnunn

I've seen this issue before. Try adding this to your .vimrc

" disable Background Color Erase (BCE) so that color schemes
" render properly when inside 256-color tmux and GNU screen.
if &term =~ '256color'
    set t_ut=
endif
pnunn commented 8 years ago

Thank you Alessandro, that seems to have done it. :)

I'm getting errors with set termguicolors saying its not an available option, is that right?

However, colors seem to be good now.

P.

Peter Nunn Director, InfoTeq Pty. Ltd. pnunn@intq.it 0412 174 230 03 9017 2707

AlessandroYorba wrote:

set termguicolors

AlessandroYorba commented 8 years ago

@pnunn In my experience vim will output an Error like that if it doesn't detect termguicolors feature at all. Verify which Vim the terminal is referencing by opening your shell and typing vim --version if termguicolors is supported you should see it printed to the screen in the list of features like so +termguicolors

jacoborus commented 8 years ago

Thanks @AlessandroYorba