Skip to content

add nvim_dark#296

Open
chrnz008 wants to merge 24 commits into
vim:masterfrom
chrnz008:master
Open

add nvim_dark#296
chrnz008 wants to merge 24 commits into
vim:masterfrom
chrnz008:master

Conversation

@chrnz008

@chrnz008 chrnz008 commented Mar 15, 2026

Copy link
Copy Markdown

ive followed the steps mentioned in #287
but im not sure what to remove and colortemplate is not picking up the statusline color correctly so ive changed the color.vim file manually
it also in vim9script even though i set the target to viml

@lifepillar

Copy link
Copy Markdown
Contributor

colortemplate is not picking up the statusline color correctly

This is the StatusLine that is generated by the template:

StatusLine     xxx term=reverse cterm=reverse ctermfg=236 ctermbg=251 gui=reverse guifg=#2c2e33 guibg=#c4c6cd

That matches your template definition:

Color: weakSnail #2c2e33 ~
Color: zanyDingo #c4c6cd ~

StatusLine weakSnail  zanyDingo   reverse

What do you expect?

i set the target to viml

I don't see where that is done. You have to add this metadata line to the template:

Options: backend=vim

@chrnz008

chrnz008 commented Mar 15, 2026

Copy link
Copy Markdown
Author

@lifepillar the statusline should be

hi StatusLine guifg=#2c2e33 guibg=#c4c6cd guisp=NONE gui=NONE ctermfg=236 ctermbg=251 cterm=NONE term=reverse

but colortempate is picking up

hi StatusLine guifg=#2c2e33 guibg=#c4c6cd guisp=NONE gui=reverse ctermfg=236 ctermbg=251 cterm=reverse term=reverse

i faced a similar issue with colorcolumn

I don't see where that is done. You have to add this metadata line to the template:

sorry i might have accidentally removed that while cleaning the nvim groups

@lifepillar

Copy link
Copy Markdown
Contributor

You should remove the reverse attribute then.

@chrnz008

chrnz008 commented Mar 15, 2026

Copy link
Copy Markdown
Author
colors is requested in `Environments` then Colortemplate uses the base-256
color value if such value is less than 16; otherwise, the color is set to
`NONE`.

@lifepillar is there a way to explicitly set NONE
and please review the latest changes (sorry if im annoying).

@lifepillar

lifepillar commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

The Color directive in a template defines, well, a color: that cannot be “none”, because “none” means the lack of a color. When you define a highlight group in a template, you may specify none to set the corresponding color attribute to NONE, or omit to omit the definition entirely (in which case the color is inherited from another definition). For example:

Normal white none

will set the background color of Normal to NONE. If you want to do that only for some environment—say, for 256-color terminals—you may use overrides:

Normal white black   ; <-- Default definition has black background
Normal/256 white none  ; Applies only to 256-color terminals: no background (“transparent”)

Btw, the Environments directive is your template is:

Environments: gui 256 0

That should be:

Environments: gui 256 16 8 0

to also support less capable terminals. Edit: And, accordingly, you should define the base-16 value of each color.

@chrnz008

Copy link
Copy Markdown
Author

@lifepillar could you review the changes

@lifepillar

Copy link
Copy Markdown
Contributor

Overall, it looks fine to me in GUI and 256-colors. What's still missing is the color values for terminals with 16 colors or less: you may see how the color scheme looks in such environment by setting t_Co, e.g.:

:set notermguicolors
:set t_Co=8

At the moment, the color scheme is broken in those environments because all the attributes are set to NONE.

See any of the templates in this repository: such colors are usually specified by name (black, red, etc…) and the allowed names are described in :help cterm-colors.

@habamax @romainl Any comments on this proposal?

@chrnz008

Copy link
Copy Markdown
Author

hat's still missing is the color values for terminals with 16 colors or less:

done!!

@lifepillar

Copy link
Copy Markdown
Contributor

There's probably some work to be done there to improve consistency. This is how the color scheme looks like in my terminal with different settings of t_Co:

  • :set t_Co=256
novum-256
  • :set t_Co=16
novum-16
  • :set t_Co=8
novum-8

You may also add this at the end of the template to provide a fallback for terminals with no colors:

Include: _tcozero

as is done by (all, I think) the color schemes in this repo.

@chrnz008

Copy link
Copy Markdown
Author

@lifepillar is there a way to test how the colors look for 16 and 8 color terminals cuz they may depend on the colorscheme used by the terminal itself and the colors look fine in my terminal

@lifepillar

Copy link
Copy Markdown
Contributor

Have you :set notermguicolors before setting the value of t_Co?

@lifepillar

Copy link
Copy Markdown
Contributor

they may depend on the colorscheme used by the terminal itself

8/16 colors are set on a “best effort” basis, because there is no guarantee how those colors are actually displayed in a given terminal. When designing for 8/16 colors you hope that the terminal's color palette is “sensible”, which means that (for a dark theme) color 0 is assumed to be close to black, color 1 is assumed to be approximately red, and so on. But of course there is no guarantee that this is the case. You should test with a few different terminal palettes, and choose palettes that are “sensible” in the previous sense.

I may have not chosen the best terminal colors in my screenshots above, but even when using other terminals there are a few things that can be improved, such as the contrast in the toolbar when t_Co is 16, or the contrast of search matches.

@chrnz008

Copy link
Copy Markdown
Author

@lifepillar could u check now

@lifepillar

lifepillar commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

I think these can still be improved:

Specific for t_Co=16

  • the contrast in the toolbar's buttons (ToolbarButton):
t_Co16-toolbar
  • The foreground for ErrorMsg (the color scheme is not using Black: I think that in some cases, such as ErrorMsg, Black could be used to improve contrast):
t_Co16-errormsg
  • with :set hlsearch on, a search match at the cursor's position is not distinguished from other highlighted items (compare with t_Co=8 or t_Co=256, where the foreground color changes when the cursor is over a match):
t_Co16-hlsearch

Specific for t_Co=8

The 8-color variant seems dominated by a red/yellow tint, differently from the other variants, which use cold colors. Is that intentional? Personally, I would try to make it look more like the 16-color variant, though I understand that with so few colors it may get tricky.

All terminals

The Spell* highlight groups use undercurl , which in many terminals cause the text to blink. That should be replaced with underline for all variants except possibly GUI Vim.

The rest looks fine to me. Ah, please double-check that diffs are readable in all variants.

The check script (Colortemplate's Check button) reports that debugBreakpoint and debugPC are not defined. Those are probably not strictly required, but it would be nice if they were defined.

You may also run hitest.vim and inspect all highlight groups (that's how I spotted the issue with spell-checking groups). Execute :so $VIMRUNTIME/syntax/hitest.vim or just press the HiTest button in Colortemplate's toolbar.

@chrnz008

Copy link
Copy Markdown
Author

@lifepillar I've changed all the suggested ones

  • im ignoring the tabpanel hi groups as they are inhereting from tabline

about this:

The 8-color variant seems dominated by a red/yellow tint, differently from the other variants, which use cold colors. Is that intentional? Personally, I would try to make it look more like the 16-color variant, though I understand that with so few colors it may get tricky.

yes the colors look very dull and numb but, if i change the colors as needed wouldn't it look different from the colorscheme itself i mean can i keep my gui colors and fallback colors different is that allowed??

@lifepillar

Copy link
Copy Markdown
Contributor

This is how I would proceed: comment out all /8 overrides in the template. Build the color scheme. Set notermguicolors and t_Co=8 then activate the color scheme. To me, it already looks better than with your overrides. Now, inspect all highlight groups (e.g., with HiTest) and uncomment or add /8 overrides for those that need to be fixed (for example, there are several that are not visible, like CursorLineFold, LineNr and many others—visual mode is broken, too). But, for example, I'd say that you don't need to define an override for Normal. And certainly you don't want it to have richBison (that is, DarkYellow) as the foreground color.

The overall idea is that your GUI/true color terminal version of the color scheme is your reference. As you reduce the number of available colors to 256, then 16, then 8, your goal is to try to be faithful to your reference as much as possible by making sensible adjustments where necessary. For 256 colors that is relatively easy. For 16 and 8 colors it becomes very hard if not outright impossible. You are very constrained, but you should strive to be faithful to your true color reference. Setting Normal foreground to DarkYellow is not faithful to your reference.

@chrnz008

chrnz008 commented Mar 20, 2026

Copy link
Copy Markdown
Author

@lifepillar now ive realized the reason why i couldn't see the 8 colors was because there are no 8 colors on windows meaning whenever i do set t_Co=8 it is getting overrided to 16 again!!

even the legacy console host uses 16 colors

@romainl

romainl commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

it is getting overrided to 16 again!!

What does that mean, exactly?

@chrnz008

chrnz008 commented Mar 20, 2026

Copy link
Copy Markdown
Author

it is getting overrided to 16 again!!

What does that mean, exactly?

i can't technically view 8-bit colors like i can do on linux

vimt_Co.mp4

@romainl

romainl commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

8c is not a different set of colors, it's just colors 0-7 of the current 16c color palette. So I'm not sure what you are expecting.

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

dark gui diff and visual should be different:

image

It is not clear what I have selected.

Same for the light version.

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

in 256 inactive statusline fg differs to gui:

image image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

MatchParen should be different to Visual otherwise it is hard to figure out if it was selected or not, in the screenshot it wasn't:

image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

256 tabline is different to gui

image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

spell in 256 is wrong?

image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

16c search has no background

image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

8c light statuslinenc

image

and tabline

image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

8c dark statusline and statuslinenc are indistinguishable

image

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

terminal colors needs to be adjusted (especially for light)

image image

@mao-yining

Copy link
Copy Markdown
Contributor

@chrnz008 I gave it a try, but none of them look very good. You’ll have to experiment a bit yourself:

Term colors: mydarkblack  mydarkred      mydarkgreen  mydarkyellow
	             mydarkblue   mydarkmagenta  mydarkcyan   mydarkwhite
	             mylightblack mylightred     mylightgreen mylightyellow
	             mylightblue  mylightmagenta mylightcyan  mylightwhite

My current attempt:

diff --git a/colortemplate/novum.colortemplate b/colortemplate/novum.colortemplate
index cf7aa53..789fa17 100644
--- a/colortemplate/novum.colortemplate
+++ b/colortemplate/novum.colortemplate
@@ -53,8 +53,8 @@ Color: zanyLlama #004c73 24  DarkBlue
 
 Background: any
 
-Term colors: richSaola fineSnake easyTetra poorLlama warmQuail gladRobin gladHuman richBison
-             dullZorse fineSnake easyTetra poorLlama zanyLlama gladRobin gladHuman soreSloth
+Term colors: soreSloth baldFossa tameHorse poorLlama zanyLlama fineSnake warmQuail dullZorse
+             weakSnail gladRobin easyTetra richBison gladHuman deadLemur longDhole richSaola
 
 
 Normal                                 tameFossa  richSaola

@chrnz008

chrnz008 commented Jun 1, 2026

Copy link
Copy Markdown
Author

This colorscheme doesn't define Type and PreProc right?

yes it doesn't

which also fixed the 256 tabline issue
@chrnz008

chrnz008 commented Jun 1, 2026

Copy link
Copy Markdown
Author

16c search has no background

it does work for me both on win32 and msys emulation

@chrnz008

chrnz008 commented Jun 1, 2026

Copy link
Copy Markdown
Author

@habamax about the visual mode overlapping with diff and paranthesis , i wanted to make the colorscheme look exactly like the neovim one is it mandatory to change them?
and the 16 and 8c colors look different for based on my terminal colors is there a specific one i should use to test them

@habamax

habamax commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

@habamax about the visual mode overlapping with diff and paranthesis , i wanted to make the colorscheme look exactly like the neovim one is it mandatory to change them?

It would be a blocker for me. But you can persuade @romainl and @neutaaaaan.

and the 16 and 8c colors look different for based on my terminal colors is there a specific one i should use to test them

It might look different but readable, I will double check with a proper default xterm later.

@chrnz008

chrnz008 commented Jun 2, 2026

Copy link
Copy Markdown
Author

@mao-yining and @habamax i need your help for DiffChange i couldnt find a color in my pallate that is not colliding with other groups

@habamax

habamax commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

@mao-yining and @habamax i need your help for DiffChange i couldnt find a color in my pallate that is not colliding with other groups

You can extend your palette, can't you? Find a color that you think would fit and use it.

@mao-yining

Copy link
Copy Markdown
Contributor

Nvim seems use underline in cterms:
图片

diff --git a/colortemplate/novum.colortemplate b/colortemplate/novum.colortemplate
index ebce09e..eacaaf0 100644
--- a/colortemplate/novum.colortemplate
+++ b/colortemplate/novum.colortemplate
@@ -87,7 +87,8 @@ Folded                                 dullZorse  longDhole
 Function                               warmQuail  none
 Identifier                             zanyLlama  none
 LineNr                                 deadLemur  none
-MatchParen                             zanyLlama  deadLemur   bold
+MatchParen                             zanyLlama  none        bold,underline
+/gui                                   omit       omit        bold
 ModeMsg                                tameHorse  none
 MoreMsg                                warmQuail  none
 NonText                                deadLemur  none

@chrnz008

chrnz008 commented Jun 2, 2026

Copy link
Copy Markdown
Author

Nvim seems use underline in cterms:

thanks but i added two new colors anyway for terminal colors and diff

@habamax

habamax commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

did you change matchparen?

I have just checked again the light 256

image

Here guess if I selected first opening ( or not.

@habamax

habamax commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

I have checked 16c in xterm for other issues I mentioned earlier, looks good for me.

@habamax

habamax commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

I have only 3 issues left:

  1. MatchParen vs Visual
  2. Spell* shouldn't use ctermul, it is not supported widely enough.
  3. ansi terminal colors should be more readable

Once resolved, I will merge the colorscheme in.

@romainl if you have time, please try this one.

@habamax

habamax commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Is it the same in neovim?

Visual and IncSearch

image

@chrnz008

chrnz008 commented Jun 7, 2026

Copy link
Copy Markdown
Author

Is it the same in neovim?

Visual and IncSearch

yes
Screenshot 2026-06-07 115841

@chrnz008

chrnz008 commented Jun 7, 2026

Copy link
Copy Markdown
Author

did you change matchparen?

@habamax can i use red for matchparen like other colorschemes it is making harder to guess where the cursor is if i use a harder bg

@habamax

habamax commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

did you change matchparen?

@habamax can i use red for matchparen like other colorschemes it is making harder to guess where the cursor is if i use a harder bg

Sure, why not.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants