riatelab / dicopal.js

Discrete color palettes (hundreds of them!) for JavaScript
https://npmjs.com/package/dicopal
Apache License 2.0
32 stars 0 forks source link

Some asymmetric and unbalanced palettes fail when 'left' or 'right' is 1 #5

Closed joewdavies closed 9 months ago

joewdavies commented 9 months ago

Hi again!

I'm sure you're sick of me by now :D! but i found a small error with some palettes when using unbalanced asymetric diverging schemes.

In this notebook: https://observablehq.com/@mthh/asymmetric-diverging-schemes-with-dicopal, set Left to 1, Right to 5 and select the palette 'Balance' and you will see what I mean.

It seems to happen with most but not all palettes.

Cheers! Joe

mthh commented 9 months ago

Thanks for the report! Indeed. Should have seen this before. I think I spotted why and I will try to fix it today.

I'm sure you're sick of me by now :D!

Ahah of course not!

mthh commented 9 months ago

Thanks again, this should be fixed by b6c54b8. I published a new release, 0.6.4. Don't hesitate if you encounter other issues!