axismaps / colorbrewer

https://colorbrewer2.org
Apache License 2.0
972 stars 89 forks source link

Hex json values #1

Closed hamhands closed 9 years ago

hamhands commented 9 years ago

I've noticed that the rgb(#color) arrays don't always work with various js libraries (c3.js for example), so I added a check for hex that then updates the json field with hex array.

What changed

Before: cb_before

After: cb_after

awoodruff commented 9 years ago

Ack, and if I'm seeing this correctly, prior to 1761fb5 it hasn't even been displaying correct CMYK values next to the color ramp? Whooooooops!

Thanks for this! I'll give it a quick check very soon.

hamhands commented 9 years ago

Oh no, the cmyk bug was something created with the hex checker in 5763e04. Everything in cmyk worked fine before I think!

awoodruff commented 9 years ago

Ah, on closer inspection you're right. For a while we didn't have the official correct CMYK specs and were calculating CMYK based on RGB. I was seeing some obsolete code there and was worried it had still be in effect.

Anyway, thanks for the update!

hamhands commented 9 years ago

Woot! :raised_hands: