colorjs / color-space

Math & data behind color spaces and color conversions.
http://colorjs.github.io/color-space
The Unlicense
324 stars 25 forks source link

Cannot read property 'husl' of undefined #27

Closed bigtimebuddy closed 7 years ago

bigtimebuddy commented 7 years ago

The newer versions of husl (6.0.2+) are built using Haxe and no longer exposes private APIs. This package is broken when doing a require('color-space') because of the following line: https://github.com/scijs/color-space/blob/master/husl.js#L20. Could you please adjust to use only the public APIs?

The workaround is to require a specific module by name and not require the husl module, e.g., require('color-space/rgb')

dy commented 7 years ago

@bigtimebuddy yes, that is recommended usage pattern (require('color-space/<target-space>')), because including the whole color-space will unreasonably bloat bundle.

But thanks for the issue.

dy commented 7 years ago

Hm not sure how to fix that but sticking to 5.x version, because public API now is flawed for color-space case.

dy commented 7 years ago

Ok, fixed in 1.14.7