tinted-theming / base16-builder-go

A base16 builder written in go, focused on convenience for template maintainers.
MIT License
50 stars 8 forks source link

Incorrect color values #4

Closed iamthad closed 7 years ago

iamthad commented 7 years ago

The builder is producing incorrect values in some cases. Here's an example from windows-command-prompt/base16-3024.reg:

-"ColorTable10"=dword:0043454a ; base02
+"ColorTable10"=dword:00434549 ; base02

Whereas 3024.yaml contains the following:

base02: "4a4543" #  --
belak commented 7 years ago

That is very strange but I'm seeing the same thing... for some reason only in the builder templates. I'm guessing there must be a bug in my hex conversion.

Also, they should be padded and aren't currently.

belak commented 7 years ago

It looks like there's a bug in the color conversion library I'm using (which isn't strictly needed because it was originally added to deal with HSV - a color space we're not supporting any more). I've filed a bug (https://github.com/lucasb-eyer/go-colorful/issues/12) and will look at either patching their library or switching to parsing the hex values myself if it's not needed any more.

belak commented 7 years ago

I've fixed the two issues (incorrect values and non-padded hex strings) in the latest two commits. Please let me know if you have any further issues. Thanks for the report!

belak commented 7 years ago

I've also opened https://github.com/lucasb-eyer/go-colorful/pull/13 to fix the issue with the library we were using.