Closed doprz closed 1 year ago
@Aonodensetsu probably an issue while generating the overview pictures?
conversion imprecision within Python I'd assume, not much I can do about it unless some other color conversion library exists
some color names were also changed in the README since the originals were not obvious, so you might be comparing the wrong values?
might also be a relic of an older version, i generated the palettes for gruvbox-material pretty early in development, let me check tomorrow if it was a bug
What tool did you use to generate the palettes?
I double-checked the values and made sure it was the same palette.
Thank you.
i made a python program for palette generation, it's in a repository on my profile (prev_gen)
Cool!
Do you mind if I create a similar tool as a CLI using Rust so that I may be able to create palette previews for dipc
?
I would keep it under the same license and credit you as the source of inspiration.
what I made is easily importable so you shouldn't need a rewrite but feel free, maybe rust is more accurate
py -c "from prev_gen import Preview; Preview($1, save=True)"
should do it in the cli
Yes, however, one of my reasons for "rewriting" it is that I've been enjoying writing Rust code and it would also make it easier to use as a utility within dipc
as it is written in Rust too.
you'll have to replace the libraries ofc but feel free to look at the source, maybe you'll like some of the data structures or lazyloaded color conversions
i found no difference, one color (bg_grey) is omitted because it didn't fit in a nice grid, it's similar to one of the bg colors anyway
checked with py -c "from prev_gen import Reverse; print(list(j.hex for i in Reverse('edgelight.png') for j in i))"
@doprz did you double check? If there are differences between the README and Vim palette (aside from the omitted bg_grey
), could you please list them in a clear format, such as the one below?
I didn't quite get what the spotted difference was from your original message.
i checked the code and hex has a perfect conversion to rgb (since it's just a different representation) and the palettes were generated from hex, so there should be no difference
i implemented reversal a few updates ago so you can take a generated image and get the code back (not in full, still figuring out if i can somehow encode the settings in the image, might look into steganography for that - already have an idea for 6kb per tile) - but it will give back the full list of colors in hex for now
as mentioned above, the command (a short python script tbh) is py -c "from prev_gen import Reverse; print(Reverse('edgelight.png'))"
where edgelight.png
is the palette filename
Closing because this seems like a non-issue but feel free to continue to discussion.
Sorry for the delay in getting back to you.
To summarize the issue, I found that autoload/edge.vim
had this value: "bg_grey": "#828A98", while README.md
didn't but instead had these two values:
"gray_dim": "#535C6A"
"gray": "#758094"
After a closer analysis, I realized that the "missing" values weren't missing but instead declared here: https://github.com/sainnhe/edge/blob/358cb6688ac577470a4eafcb53bdd63899dfc937/autoload/edge.vim#L119-L123
This means that for me to add the full-color palette to dipc
I would need to add "bg_grey" to the "missing places" here:
https://github.com/doprz/dipc/blob/d3d3f41558583e78098b075ed40153357f6bfa3c/src/palettes/edge.json#L9-L10
Would you suggest that I add "bg_grey" or keep it as is (using the colors shown on the README.md
)?
On that note, I'm also going to check the other @sainnhe themes in dipc
to make sure I didn't miss anything.
Thank you for your quick responses!
Hi, first of all, I have to say that great job with your color themes/palettes. I've enjoyed using them quite a bit!
I noticed that the colors displayed on the
README.md
andautoload/edge.vim
differ slightly. Are these changes on purpose?README.md
autoload/edge.vim
I noticed that this issue is persistent throughout all of the displayed themes/variations.
I'm currently working on a project called dipc - "Convert your favorite images and wallpapers with your favorite color palettes/themes" and I've implemented a couple of your themes.