Skip to content

Bad contrast for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme #2705

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

Closed
nmattia opened this issue Mar 13, 2024 · 7 comments · Fixed by #2708
Closed

Bad contrast for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme #2705

nmattia opened this issue Mar 13, 2024 · 7 comments · Fixed by #2708
Labels
awaiting feedback bug Something isn't working

Comments

@nmattia
Copy link

nmattia commented Mar 13, 2024

Description

I've recently updated nvim-tree and I can't see the window pickers anymore! The contrast on the default nvim colorscheme is quite bad. Here's the output from NvimTreeHiTest (NvimTreeBookmarkHL is pretty bad too):

Screenshot 2024-03-13 at 16 54 56

Do I have my colors set up wrong?

Neovim version

$ nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1693350652

Operating system and version

macOS 14.4

nvim-tree version

github:kyazdani42/nvim-tree.lua/efafd73efa9bc8c26282aed563ba0f01c7465b06

Steps to reproduce

:colorscheme default
:NvimTreeHiTest
@nmattia nmattia added the bug Something isn't working label Mar 13, 2024
@nmattia nmattia changed the title Bad contract for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme Bad contrast for NvimTreeWindowPicker & NvimTreeBookmarkHL on default colorscheme Mar 13, 2024
@alex-courtis
Copy link
Member

I was afraid of this. #2415 applied normal vim highlight groups links for all but NvimTreeWindowPicker and NvimTreeFolderIcon. There were no close groups and the hardcoded highlights were left unchanged.

Are you running notermguicolors and a 256 color term? I get similar results when I do that.

Nothing we can do about NvimTreeBookmarkHL as that's the vim builtin SpellLocal. Most color schemes deal with that one.

NvimTreeFolderIcon looks OK on most backgrounds as it's a blue.

That leaves NvimTreeWindowPicker "guifg=#ededed guibg=#4493c8 gui=bold ctermfg=White ctermbg=Cyan"...

@alex-courtis
Copy link
Member

Can you please experiment with NvimTreeWindowPicker to find cterm values that work for you?

@nmattia
Copy link
Author

nmattia commented Mar 14, 2024

Yep I’ll give it a try! What’s the best way to try this out and what constraints do you have on the colors? For instance, should other palettes not be reused?

@nmattia
Copy link
Author

nmattia commented Mar 14, 2024

Are you running notermguicolors and a 256 color term? I get similar results when I do that.

Ok, I was indeed running notermguicolors. With termguicolors it looks much nicer! I can definitely work with that.

One note though, now it's the NvimTreeNormalFloat that's a bit hard to read, though not as bad as the window picker with notermguicolors:

Screenshot 2024-03-14 at 10 50 19

@nmattia nmattia closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
@alex-courtis
Copy link
Member

Ok, I was indeed running notermguicolors. With termguicolors it looks much nicer! I can definitely work with that.

You shouldn't have to use termguicolors, things should look good on 8,16,256,truecolor terminals with and without it, as it's not always available.

One note though, now it's the NvimTreeNormalFloat that's a bit hard to read, though not as bad as the window picker with notermguicolors:

That is indeed annoying, the standard NormalFloat is a bad colour. Unfortunately some colour schemes and users rely on changing NormalFloat instead of NvimTreeNormalFloat so we can't do anything about that without breaking.

@nmattia
Copy link
Author

nmattia commented Mar 15, 2024

Very cool, thank you!

@nmattia
Copy link
Author

nmattia commented Mar 15, 2024

For the record, before:

Screenshot 2024-03-13 at 16 54 56

after:

Screenshot 2024-03-15 at 11 25 49

NvimTreeWindowPicker is much, much more readable! Though now that I've learned about termguicolors I think I'll stick to that, it's much softer on the eyes. Still, fix & feedback much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback bug Something isn't working
Projects
None yet
2 participants