Misterio77 / flavours

🎨💧 An easy to use base16 scheme manager that integrates with any workflow.
MIT License
506 stars 28 forks source link

fix weird color issue (#14) #22

Closed loiccoyle closed 3 years ago

loiccoyle commented 3 years ago

Hi again,

This should fix #14 , it seems it is an issue with the alpha channel, so I basically convert the image to rgba format regardless of it has one and provide the ColorFormat::Rgba format. Keep in mind I basically have no rust experience so if I mishandled anything please let me know.

Before: https://imgur.com/a/U8Aa0kR

After: https://imgur.com/3q2A2lw

As far as I can tell this doesn't break anything, but please try it out.

Misterio77 commented 3 years ago

Thanks for the fix!

Misterio77 commented 3 years ago

I'll be sure to test this with my images to make sure schemes generated from images that previously worked don't change (too much).

I should refactor the code asap to include automatic tests for future pulls, though. I'm a lot better at Rust than i used to be when i wrote flavours, so there's a lot of improvements to be done.

Thanks again for catching and fixing this!

Misterio77 commented 3 years ago

It seems the changes are pretty minor. The trim colors differ a bit (mostly just the order is changed), and sometimes one or another is swapped (probably happens because of the color fixing code). Nothing that should break people's setup anyway (unless they actively depend on color order... which i think no one does lol).

Will try and see if i can include more improvements to release together with this on 0.4, but if it takes too long i will just release this with 0.3.5

loiccoyle commented 3 years ago

Perfect, thanks a lot!

Misterio77 commented 3 years ago

Sorry for the delay, getting this new version release right now.

loiccoyle commented 3 years ago

No worries !