Closed antoineco closed 2 years ago
Very nice! Please go ahead and submit the pr :+1: :tada:
@antoineco, thanks again for your contribution, truly appreciated. There are however one thing with the fixed color palette that I believe degrades the end user experience.
With the applied fixes some labels becomes hard to read. I took the liberty to adjust certain colors when I made the themes as seen in the screen shots below, specifically the color used for the git branch label so the contrast would be more profound. I'd prefer to use the strict colors everywhere but it isn't as friendly for the eyes. What's your take on this?
Previously:
Updated:
Interesting point.
It seems like you're using the pure
prompt for Zsh? By default, Pure uses the color 242 for the git:branch
component.
On both of the machines I use (macOS with Kitty, Windows 11 with Windows Terminal), the Pure prompt looks like this with the colors submitted in my previous PR:
Questions
Is your Pure prompt maybe configured to use black
(or 0
) instead of 242
?
If that is the case, in any given dark terminal theme I would expect #black
on #background
to look very dark. Likewise, in a light terminal theme, #brightwhite
on #background
will look very light (the other extreme of the color range).
Take the example of the popular Nord theme, or even this huge list of terminal themes; the color black
(30m) looks always very dark on the background, which is usually considered to be expected because terminal applications don't explicitly use #black
as foreground color. They use either #foreground
, one of the 16 ANSI colors except white/black, or a well-chosen color in the 256 color range. Which is why I would be surprised if your shell prompt was defaulting to black
/ 0
.
If not, could it be that something is overriding your terminal colors? I know that Kitty allows redefining all 256 terminal colors.
I usually use the script from the following Gist to display my 256 colors:
curl -s https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/e50a28ec54188d2413518788de6c6367ffcea4f7/print256colours.sh | bash
I get this as output (pay attention to the grays at the end especially):
Nice catch and I believe you're right about Pure. I'm currently using Fish shell with Pure in Linux and on Mac. I'll investigate this further.
This is the output I got from the script you provided:
Ah, the Fish port of Pure uses #brightblack
as foreground color for the Git branch: https://github.com/pure-fish/pure/blob/2d07e74567e9190c82ae66c37c34ca86850cd9ac/conf.d/pure.fish#L6
I tried applying the same color in (Zsh) Pure, and you're right. I think the current #brightblack
looks OK for autocomplete suggestions, but it's too dark for prompt components (see screenshot below for a comparison of 242
vs. #black
vs. #brightblack
):
I still believe a shell prompt should use better colors than #(bright)white
or #(bright)black
as foreground color to display information β unless it was specifically designed for either a dark or light theme β but I also agree that a better contrast could be a sensible default.
I learnt something new today, thank you :beers: I fixed my shell theme by modifying a couple of Pure vars. Lesson learnt from this is to run a non modified terminal if ever creating another theme again :slightly_smiling_face:
While looking into the collection of upstream color themes for Kitty, I noticed that somebody had already contributed variations of the Everforest color scheme. So first of all, thanks a lot for this! π
I noticed that a few of the 16 base colors were misused though. Here are a few examples, illustrated in the screenshot(s) below:
black
andforeground
are the same.Problem: This should never be the case in a terminal color scheme, because it can render some text invisible.
Fix: strictly stick to the
fg
color defined in the scheme's palette2, which is for foreground colors. You may also notice thatpalette2
remains the same in all hard, medium and soft variations of the scheme.in the dark theme, base colors are bright, bright colors are not
Problem: These are semantically reversed. A bright color shouldn't be darker than its non-bright counterpart.
Fix: see next point
Foreground colors are arbitrarily selected from either the dark or light palette
Problem: Probably my biggest concern with the current version of this Kitty theme. After inspecting the different colors, I realized that they have been selected arbitrarily from both the dark and light variants of the scheme's palette2, which explains the previous point. In the original color scheme, colors from each variant are strictly defined in palette1 + palette2. The dark variant doesn't "borrow" colors from the light variant, and vice versa. This makes this theme a custom interpretation of Everforest, but not a strict port of the original Vim Everforest colors.
Fix: only use colors from the "dark" palette1 + palette2 in the dark themes, only use colors from the "light" palette1 + palette2 in the light theme.
I have "fixed" versions of all 6 variants locally, but before submitting a PR I wanted to share the result with you, and ask whether you would be willing to accept those changes.
before
after