vim / colorschemes

colorschemes for Vim
279 stars 23 forks source link

16c Diff Colors #121

Closed habamax closed 2 years ago

habamax commented 2 years ago

We should probably do 2 sets of diff colors: dark and light suited for 16c palette where foreground should not be transparent. And apply it for all.

@romainl does it make sense?

romainl commented 2 years ago

TBH, that was my thinking when I started to work on that universal theme we talked about on IRC.

Anyway, 16c is too constrained. The main problem I see is all the potential clashes between the syntax highlighted foreground color and the background color of DiffChange/DiffText/DiffAdd.

Capture d’écran 2022-01-18 à 14 32 51

In the image above…

Whether highlighted text is readable or not is pretty much random at this point. I think it's quite clear how difficult it is to have both syntax highlighting and diff background in such a constrained context.

Capture d’écran 2022-01-18 à 14 41 04

You will notice that using a black foreground makes almost every line more readable.

Back when I was actively designing Apprentice, that diff issue inevitably came up and I had to choose between:

In the end, I chose the latter because I figured syntax highlighting was just noise in that context.


FWIW:

:for i in range(1,16) | call matchadd('x' . (i-1), '\%' . i . 'l.*') | endfor
:for i in range(1,15) | execute 'hi x' . i . ' ctermbg=' . i . '  ctermfg=NONE' | endfor
:for i in range(1,15) | execute 'hi x' . i . ' ctermbg=' . i . '  ctermfg=white' | endfor
:for i in range(1,15) | execute 'hi x' . i . ' ctermbg=' . i . '  ctermfg=black' | endfor
romainl commented 2 years ago

And then, there is the CursorLine problem ;-)

habamax commented 2 years ago

do you think it is a good idea to have it not only for 16c?

romainl commented 2 years ago
Capture d’écran 2022-01-18 à 15 07 17

This is how I do it in Apprentice, and now with my little "universal" experiment:

It's far from perfect but that's the compromise I settled for. Is it one we should shoot for? I have no idea but I think that would make things simpler for 16c diffs.

habamax commented 2 years ago

It's far from perfect but that's the compromise I settled for. Is it one we should shoot for? I have no idea but I think that would make things simpler for 16c diffs.

Let's do it.

habamax commented 2 years ago
Include: _diff_dark

or

Include: _diff_light
habamax commented 2 years ago

desert in 16c:

image

habamax commented 2 years ago

desert in 256/GUI image

habamax commented 2 years ago

and it actually works fine for white colors too: image

habamax commented 2 years ago

@romainl I think we need to change difftext to darkgreen for 16c:

current master

image

darkgreen DiffText

image

See currentWord and w

habamax commented 2 years ago

Or use black fg for there...

habamax commented 2 years ago

shine:

current

image

darkgreen

image