-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Support schemes in YAML format #512
base: master
Are you sure you want to change the base?
Conversation
Before I undraft this, could @Gelmo (from #490) and @Lira-tron (from #499) check that the Dracula and gruvbox-material screenshots (and schemes, if you can) look as they should? |
Nice! I noticed that the font used in the new screenshots differs from existing screenshots. Here are my notes on Dracula as requested. These notes are in regard to the image, not the theme/scheme files themselves. I'm using the screenshot replaced in this PR instead of what you posted in the previous PR. I'm checking locally with GIMP's color picker and with https://imagecolorpicker.com to confirm, and comparing to https://spec.draculatheme.com. But based on what you said in the previous PR RE screenshots, I'm not sure this means much haha:
The Dracula.yml file looks to be correct when compared to https://spec.draculatheme.com/ Looking at the themes for Alacritty, Ghostty, and Kitty, which are all hex colors, those all seem to be correct as well. |
Yes, that happened in #491 :) Before that PR, screenshots were created by hand by contributors, so cropping was inconsistent from image to image and text could be squished in various ways. What do you mean with "inconsistent" though, re the bright colors? 🤔 And thanks for double-checking!! |
Due to the high compression of the screenshots, the true color cannot be found in some of the printed characters; there is significant variance. Here is a screenshot of the BrightRed against the default background, zoomed in (from the image added in this PR): The color #FF6E6E does not appear in any of the pixels in this screenshot, due to the heavy compression. |
Ah! Gotcha – that's not (lossy) compression (they're PNGs), that's ringing artifacts which are caused by us resizing the screenshot down to the predetermined 600x300 size (especially since I poorly chose Lanczos resampling as the resampling algorithm). Please find below the original, crisp, fresh and clean 1280x608 version of the screenshot (click through to open in full size, etc., etc.): On a related note, which of these looks the best to you? (They're all the same image, just rescaled down using a different resampling algorithm.) |
I recently stumbled on this colorspace issue when trying out Ghostty using the Wombat theme and noticing that my Neovim theme (wombat.nvim) that I wrote while using iTerm2 doesn't quite match. Using a file specifying the color space seems like a good idea, but neither the iTerm2 or the Ghostty (or other derived themes) appear to actually respect the original colorscheme. Here as an example, here are the background colors:
As for Assuming this PR moves forward, what would be the recommended course of action? I'm thinking that since the vim colorscheme is the original source but doesn't have all terminal colors represented, I can create a YAML file using the hex values shown to me in iTerm2 after loading the scheme. I could update it as well to be more faithful to the original Vim colorscheme, but I'm thinking that may not be worthwhile since the original iTerm2 theme itself has a 14 year history. |
This looks perfect! I've confirmed that the colors that I previously couldn't confirm are indeed in the expected places in that image.
On my display and with my eyes, numbers 1 and 2 are the most appealing to me. They are practically indistinguishable from one another until zooming in on characters in front of light backgrounds. Number 5 has easier to read characters against the darker backgrounds despite having brighter colors. Looking closely in GIMP, number 6 is the only one that shows the correct colors, despite being the least visually appealing of the bunch. In my opinion, I would go with number 6 since it accurately represents the themes. Maybe the look could be improved with a different font and/or font size. And maybe different characters than "qYw" |
@ViViDboarder In my opinion, existing official scheme files should be ignored if that theme also has official specifications. Ideally everything here would be built to spec when possible unless requested by the upstream theme for a specific reason. Then themes generated here could be used to replace/update official schemes upstream if they have schemes that don't respect their specifications, if they desire. |
@Gelmo Thanks for the input! I realized one more thing regarding the font rendering to improve things – which one(s) do you prefer out of this batch? |
Sorry, went to bed after my last comment!
I think number 5 is the way to go. It has similar blur to number 4 but it's still legible enough and it shows accurate colors of the represented theme. I assume it will not be trivial to get it to look better at that size while retaining the accurate colors. Sorry for making you put in all this effort xD hopefully my eyes and your work will be beneficial to this project :P |
@Gelmo No worries, time zones are what they are (I'm based in Finland), and I'm also a sleep enthusiast in my free time 😂 I agree that number 5 looks good, so let's go with that... |
…r for scaling down
Also adds a script to convert Kitty to YAML. Follows up on mbadolato#490
Thanks! I'll try to review this over the weekend |
Description
This PR is a bit on the big side, sorry 'bout that!
Screenshot generator
Theme converter
Themes
Misc.
This will make it easier to contribute themes without having a Mac at hand (see e.g. #502).
Users can still contribute themes in the iTerm scheme format, and things work just as they did before, but where a theme has a YAML file, that will be considered the source, and the similarly-named iTerm color scheme file will be generated from that YAML file.
Caution
The dark/light variants that had been in the Gruvbox Material iTerm color scheme are obliterated by this change. (We didn't support reading those into other scheme formats anyway.) Is that OK?