vim / colorschemes

colorschemes for Vim
285 stars 23 forks source link

fortnight: tomorrow night, but longer #247

Closed craigmac closed 1 year ago

craigmac commented 1 year ago

Thought I was would open this to see if there's any interest in this colorscheme I've been developing. I'm not sure if we want another low-contrast in the bunch, but this one offers a bit more than habamax in that I've added some extra Neovim support (template comments in the additional highlights section explain further).

It started as tweaking Tomorrow Nights yellow and green to be more easily distinguishable to me, although I may be in the minority here I had a hard time distinguishing the two, and wanted my ANSI green and yellow colours to be more obviously green or yellow.

Of course one small tweak upsets the balance, and so further tweaks are needed. I ended up with a palette where the saturation and lightness values are about 25%/70%, all chosen from the xterm 16-255 color indexes. I made one small concession to make index 7 be a 'gray' as many terminal programs still seem to expect and rely on, rather than just black (index 0) again.

The inspiration is obvious: Tomorrow Night palette, and also draws from some prior excellent work in habamax and apprentice.

I haven't yet done 16/8 color versions because I'm not exactly sure how go about doing that well and how to test it, but will definitely give it a shot if someone could give me pointers.

If you'd rather not add this Tomorrow Night knock off, I'd still appreciate a good thrashin' on all my missteps, I'm here to learn.

Here's the palette as of this writing:

Screenshot 2023-06-14 at 11 27 28 AM

https://color.hailpixel.com/#262626,CB8988,8FAE8A,AFAF87,98B2C8,AF87AF,87AFAF,D0D0D0,A8A8A8

If you think it's worth continuing with this, I'll setup all the screenshots like I see others have done and edit this.

Some quick non-standard screens:

Terminal.app (no termguicolors support):

Screenshot 2023-06-14 at 12 01 07 PM

MacVim (set termguicolors):

Screenshot 2023-06-14 at 12 09 03 PM
romainl commented 1 year ago

Thank you for this. I will try it for a couple of days but here are a few early comments:

craigmac commented 1 year ago

Thanks a bunch! I'll take a look at your points closely. To your points:

Neovim support is a non-goal of this project,

Yes absolutely, the only reason I mention it as a weak differentiator between fortnight and habamax. Although I wouldn't advertise this point due to the confusion and bug reports/questions it would produce.

habamax and fortnight seem to fill the same niche already,

Yeah I agree, that's why I'd be hesitant to add it as well. There were comments somewhere on this repo about Tomorrow Night and some other classics as potential candidates, so I figured I'd give it a shot.

the popup menu doesn't stand out very well,

Agreed, I've gone several ways with this, and I'm going to rethink it again. I like what zaibatsu has done here, I'll take inspiration from that to improve it.

the CursorLine is a tad too dim,

Lightened that to #3a3a3a (237) and darkened ColorColumn to #1c1c1c (234) to differentiate better (was 237).

the CursorLineNr doesn't stand out very well,

I agree - I made the aesthetic decision to narrow the range of brightness, so as to not have anything pop-out too much. You could argue that certain things are supposed to pop-out more, the default Pmenu sure as hell does.

there are issues with Visual:

Is the way habamax does Visual the way determined to be the best/most useful? I like it that way myself too, and originally had the black on blue. Using reverse video for Visual was my attempt at fixing the fact that Visual would obscure Search hits. I don't think it's that big of a problem, really, so I'll reverse my reverse decision.

craigmac commented 1 year ago

oops, closed by accident

craigmac commented 1 year ago

any thoughts on it @habamax ?

romainl commented 1 year ago

The point about Visual isn't really that there is an officially blessed way, or that it is especially well done in habamax.vim. However, that approach is the most common, though, and the most sensible and practical IMO.

When you select some text, you can basically go in two mutually exclusive directions: prioritize the syntax highlighting or prioritize the visual selection.

Here is the Apollo graphql sandbox, where the choice was obviously to prioritize the syntax highlighting:

Capture d’écran 2023-06-20 à 07 33 59

Mission accomplished, but at the cost of having a hard to see visual selection.

Here is Vim with my own Malotru, where the choice was to prioritize the selection:

Capture d’écran 2023-06-20 à 07 45 17

Which is more efficient is highly context-dependent.

For example, the richness of the syntax highlighting is to be taken into account: the richer it is, the more you may want to preserve it. Or not :-). The number of colors in the palette is also important: if you want to preserve syntax highlighting, then you are kind of forced to use a color that is not used for syntax highlighting, which might prove complicated. Contrast is also an issue: low contrast/dark background means that it will be complicated to find a suitable color because the bg and fg are already pretty close to each other. Etc. There are lots of things to get right if one goes the "prioritize syntax highlighting" way.

Prioritizing the selection is comparatively simpler: the bg color can be taken from the existing palette without issues and contrast is no longer an issue. And FWIW, the visual color can become a strong part of the brand identity of your colorscheme (as in Apprentice, for example).

You seem to have chosen a middle ground but I don't think it works very well. The high contrast of the bg color makes it easy to see what you do but the reverse syntax is too weird: it doesn't really preserve the information because it presents it differently.

habamax commented 1 year ago

@craigmac I will look into it, thx (I was a fan of tomorrow night).

habamax commented 1 year ago

Spell looks too dark maybe? image

baz blends too much into cursorline? image

quickfix doesn't look good: image

PS, I haven't check GUI and 16/8 colors

craigmac commented 1 year ago

Thanks for the comments, I'll use them to improve it for myself. I'll close this as I don't think it's quite distinct enough from habamax to add to this repo.