Skip to content
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

Comments are still pretty unreadable #195

Closed
stefanfrede opened this issue Feb 26, 2020 · 9 comments
Closed

Comments are still pretty unreadable #195

stefanfrede opened this issue Feb 26, 2020 · 9 comments

Comments

@stefanfrede
Copy link

Hi! I like the Nord colours a lot and I use them for mostly everything CLI related. Great work! The only problem I have is that I'm more or less flying blind when writing comments. Luckily I'm able to touch type ;) I just read through the issues and release notes and learned that there already went a lot of effort into this topic. But I'm wondering, when I compare my screen with how it is supposed to look after the 0.10.0 release I get the feeling that I have still have the old colours even though I installed the latest release (0.13.0). My terminal is Kitty and here is a screenshot:

nord-vim 0.13.0 in Kitty terminal

@arcticicestudio
Copy link
Contributor

Hi @stefanfrede 👋, guessing color values from screenshots is hard (and inaccurate due to color profiles differences), but this looks indeed not as bright as it should be.
Could you please post your current Vim configuration (default is the .vimrc file in your home directory) so I can try to reproduce it? Might also be related to the terminal (Kitty), unfortunately there are often differences in the way colors are handled and rendered between different terminals. I've tested it on iTerm2 (macOS) and Tilix (Arch Linux with GNOME) and it works fine with a clean configuration, but there can be many other reasons like configuration options or other plugins that cause this inconsistency.

@stefanfrede
Copy link
Author

@alecandido
Copy link

I have the same issue of @stefanfrede , using nordtheme both for vim and st terminal (with a further alpha=0.94 for st), and it's wonderful, thank you for your work.

Currently I adopted the solution you suggested in #196 , but white comments are really bad, so I opted for ctermfg=242 for Comment (same for LineNr).

  1. do you have any suggestion for a dark colour better integrated with the palette but still readable?
  2. for consistency: is there a way to customize directly the variable s:nord3_term without touching the plugin file colors/nord.vim?
    (my personal answer is no currently, but I don't have so much experience with vimscript and vim config files)

@arcticicestudio
Copy link
Contributor

@stefanfrede Could you please try to add the following option to your configuration?

if (has("termguicolors"))
  set termguicolors
endif

@arcticicestudio
Copy link
Contributor

@alecandido Thanks, nice to see you like it 😄
Could you also please try if it works when setting the termguicolors option?

  1. I can only think of one color from the snow storm palette, otherwise any HEX color that is similar to the current comment color (requires the termguicolors option in order to work in terminal mode).
  2. The s: means the variable is scoped to the script is was declared in so there's no way to modify it from the outside. I'm also not a Vim script "pro" at all and also need to read docs again and again when the theme or my setup requires changes, but it's normal to not being able to know and write 10+ different languages 😄 There are nice resources like Vim syntax cheat sheets to get things done.

@stefanfrede
Copy link
Author

@arcticicestudio That solved it. Thank you!

@alecandido
Copy link

Sorry to reply late.

First things first: I tried with your solution, but unfortunately is not working, set termguicolors is screwing up all the colors, and turn them all to white.

Then:

  1. of course hex colors are not available, so my first guess ctermfg=242 is still my favorite choice, but I would have preferred slightly more bluish, instead of flatly grey
  2. for sure I'm not an expert of Vim script, and I thank you also for the reference (I looked at others but that one seems really promising), other than for your work, but don't you think that making also colors customizable from outside can be a good idea?
    • it would be fine to have a hook somewhere to replace colors that for some reasons (terminal background or whatever) don't fit for a specific user
    • the theme is still useful because it's a guideline and still decide what have the same color and what a different one, and make most part of the job
    • for sure it's not a priority, the theme it's fine on its own 😄

Thank you for your reply, at least the reference was useful and I keep using your theme 👍 .

@arcticicestudio
Copy link
Contributor

@alecandido Sorry, I missed your comment because the issue was closed and I've marked it as done in the GitHub notification center.

It's possible that you're using a terminal that doesn't work out-of-the-box with 24-bit colors so in order to use the termguicolors option some additional steps are required. For example, see nordtheme/emacs#59 (comment) which describes that the kitty terminal requires a extra terminfo file. What is the output when you run echo $TERM?
Maybe you'd also like to check out the great Gist about colors in terminals, there are many information why colors are still sometimes a pain in terminals.

Regarding the customizable colors: I guess the reason to use a theme are the colors and how they are combined so making them configurable is more like rebuilding Vim's theme engine 🙃The current way of allowing users to customize any highlighting group is a powerful tool and allows to change parts of the theme to any other color. It also ensures that the modifications are only scoped to the Nord theme and doesn't effect others. This is also valid for any other Vim option, so e.g. in your case the `termguicolors_ option can only be set when Nord is currently the active theme. This would make sure nothing breaks for other themes.

@alecandido
Copy link

Don't worry to be late, it's fine:

  • in the meanwhile I got a little bit more expert on colors and I found on my own the gist; I'm perfectly aware that I'm using st (is it possible to use it without knowing?) but the problem is that it is not clear if it is supporting or not truecolors (somewhere, if I remember correctly on wikipedia, there is written that yes, but since it's actually not working on my installation I'm considering it as a no, even if maybe I'm only missing a patch)
  • on the other hand even if I agree that in principle a color palette is such because of the full combination, and customize it means use another one, it sometimes can happen that a single color is not working, I would like to address this use case

Thank you again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants