graypegg / chromatism

:rainbow: A simple set of utility functions for colours.
1.78k stars 37 forks source link

Builds for node 4+6 are failing on Travis CI #22

Closed graypegg closed 7 years ago

graypegg commented 7 years ago

Haven't gotten a chance to look into this, but I should have a minute tonight to resolve. I think something needs a ES6 environment.

https://travis-ci.org/toish/chromatism/builds

TehShrike commented 7 years ago

Looks like it's floating point calculation differences. We'll have to change the deepEqual assertions to only compare fractional numbers to one-millionth accuracy or something.

graypegg commented 7 years ago

I had a list of accuracy values for each colour in test/consts.js, I'll go thru and adjust those later tonight, seems to be an issue with CIELAB, might be able to cut out a couple operations which MIGHT save some accuracy

graypegg commented 7 years ago

https://travis-ci.org/toish/chromatism/builds/246632620

Rounding string-based colour modes when converting to CIE-* colour spaces fixes the floating point issue!

TehShrike commented 7 years ago

Fixed in https://github.com/toish/chromatism/commit/144ae7bd7d8a8f7292942772767fd121ee3f723f