Use base16_color_scheme for building the base16-themes #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using
flavours
more or less since I switched to arch 2.5 years agoand I'm really loving it.
Though when at the current implementation of I found a few things that
could be improved, a few edge cases that could be caught.
One example would be that
{{ base00-rgb-r }}
doesn't get expanded andthat things like
don't get removed as they should.
(This specific example seems to be a common
mustache
-pattern to write comments.)To help to improve that I wrote a small crate I called
base16_color_scheme
.(Because I'm terrible with names.)
It uses
ramhorns
asmustache engine and is focused on maintainability, performance and
correctness.
I tested its results against
flavours
current implementations for allavailable templates using
cat ~/.local/share/flavours/base16/templates/*/templates/*.mustache > all_templates.mustache
and the results are mostly the same except for cases like those described above,
while being 10 to 12 times faster on
--release
.(Though that doesn't really translates to smaller files, because in
those cases alone the act of reading and writing the files takes much
longer than the building step and also has much more variance.)
Due to the way I build the library it was it was trivial to implement
support for up to 256 colors (
base00
tobaseff
, which is exactly what au8
holds.)and the
Hls
color-space.(Fixing #49 and #73, though looking at it
base24
already was supported.)This is actually one of the first library-crates I have written and the
first I have published to
crates.io
so I'm open to constructivecriticism.
One thing I definitely still have to improve in my crate is documentation. The
current API should be fairly self explanatory, but having a description
of what the different parts do and examples on how to use them is
something I really want to add.