Skip to content
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

What did we learn so far? #194

Open
romainl opened this issue Jul 2, 2022 · 10 comments
Open

What did we learn so far? #194

romainl opened this issue Jul 2, 2022 · 10 comments

Comments

@romainl
Copy link
Collaborator

romainl commented Jul 2, 2022

Now that we have shipped the remakes it is time for the next step: define the guidelines/best practices to enforce when considering the inclusion of new colorschemes.

To ease that process I thought it would be useful to grab a box of Lego, some markers and Post-it no jot down what we have learned about so far about user expectations, technical restrictions, etc. And maybe even suggestions for how to move forward.

@lifepillar
Copy link
Contributor

If that can help, and although you probably already know about it, you may take a look at :help colortemplate-best-practices. Maybe, the kind of guidelines you have in mind are a bit more high-level than what is suggested there, but still there may be something interesting to consider.

And FYI, I still have a plan to release a v3 of Colortemplate eventually, rebuilt from scratch and simplified in many respects. You have used the templates a lot: if you have suggestions about improving the syntax, the semantics or the workflow, I'd like to hear your feedback. In fact, I do not plan to strictly preserve backward compatibility (Colortemplate v2 is stable and will still be around for the time being), so designing a somewhat different syntax is not out of question. I might even decide to go for a new (shorter!) name for the plugin.

@habamax
Copy link
Collaborator

habamax commented Jul 4, 2022

  1. No settings, e.g. if anyone needs to have italic comments -- let them use Colorscheme autocommand.

  2. Support GUI, 256, 16, 8 colors (+ no colors with _tcozero). In general it should be readable there.

  3. Use color names for 16 and 8 colors

  4. Do not assume terminal has black background (define Normal colors)

  5. Typefaces should be used with caution (unless you are ok if in some cases your colorscheme becomes "minimal")

  6. No dual background colorschemes

@habamax
Copy link
Collaborator

habamax commented Jul 4, 2022

And it would be really nice to have a template for colortemplate (which we should have in the beginning :) ) to have not only uniformed colorschemes but also templates.

@romainl
Copy link
Collaborator Author

romainl commented Jul 4, 2022

I agree, providing a template with lots of comments, a bit like RNB, would be great for bootstrapping new projects.

Or maybe that's something that should be part of Colortemplate?

@habamax
Copy link
Collaborator

habamax commented Jul 4, 2022

Or maybe that's something that should be part of Colortemplate?

I guess it belongs to this repo, not to colortemplate (colortemplate allows many fancy things and I don't think it would be wise to soft-lock users to what we want to have in vim/colorschemes land)

@lifepillar
Copy link
Contributor

Do not assume terminal has black background (define Normal colors)

To add to this: Normal should be defined first. That should be suggested somewhere in Vim's help. It would be nice if the other highlight groups were sorted lexicographically.

No dual background colorschemes

Why? I think that is supported by Vim.

a template with lots of comments, a bit like RNB, would be great for bootstrapping new projects.

Bootstrapping can be done from an existing color scheme with colortemplate#import#run(). If you need a “meta-template”, you may start with those provided by Colortemplate in its templates directory.

@habamax
Copy link
Collaborator

habamax commented Jul 5, 2022

No dual background colorschemes

Why? I think that is supported by Vim.

Harder to support by us if author would decide to not to.

@craigmac
Copy link

  1. Do not assume terminal has black background (define Normal colors)

I'd reword that as "Always be explicit," two of the bugs I've reported now have been because something that could be set like Terminal in the latest one, was left cleared , and the first one with TabLine was the same. Don't trust any "fallthrough" behaviour because there's so many variations underneath.

@habamax
Copy link
Collaborator

habamax commented Jul 25, 2022

No dual background colorschemes

Why? I think that is supported by Vim.

Harder to support by us if author would decide to not to.

I take it back

@lifepillar
Copy link
Contributor

Other guideline/best practice (or, even better, something to be enforced) for future color schemes: set minimum threshold for acceptable contrast, at least for main fg/bg colors (Normal). Unless low-contrast color schemes are considered acceptable, of course.

I would also encourage/enforce people to limit the color difference between the GUI and (xterm) terminal values (the “delta” value provided by Colortemplate's color similarity table) to some realistic upper bound. This is more delicate, because the xterm palette is very limited, but it would be an objective argument to reject color schemes such as Solarized, whose 256-color version is… well, another color scheme entirely (which surprises many users).

And talking about Solarized: I would also encourage (or, in this case, I'm very keen to say: enforce) that the terminal colors (g:terminal_ansi_colors) be set to “sensible colors”, i.e., color 1 should look reddish, color 2 should look greenish, and so on). There is currently no statistics in Colortemplate to measure how “sensible” terminal colors are, but it could be added, e.g., as a color difference between a color scheme's terminal color and a default (xterm) value.

A problem with these rules is that they are easy to check if the color scheme is done with Colortemplate, but they may difficult to check otherwise. A possible solution might be to move all the color-related functions to an independent (and community-maintained) plugin. Someone could also add some functions to measure various blind-color issues—something I had wanted to do for a while, but I haven't had time to do yet. Thoughts?

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

No branches or pull requests

4 participants