gampleman / elm-visualization

A data visualization library for Elm
http://package.elm-lang.org/packages/gampleman/elm-visualization/latest/
MIT License
514 stars 48 forks source link

Color interpolators #76

Closed deciob closed 4 years ago

deciob commented 4 years ago

This is still wip, but putting it here to better expose what I am doing. There is an issue with the Interpolator.hcl method, but did not have enough time to dig into it, so at the moment I am not sure what is going on.

deciob commented 4 years ago

@gampleman I think this pull request is ready for review.

I have:

I still have one doubt on hclLong. It is returning rgb negative values instead of 0s. I have added a forcePositive function. The interpolation looks correct, but it is a bit of a hack. Not sure though where the originating issue is and if it is an issue at all.

deciob commented 4 years ago

@gampleman I have squashed everything in a single commit. If you prefer keeping the full commit history, I have made a back up branch.