News for hackers. Stuff that matters.
Re:Show HN: I Made JavaScript Color Conversion Library for L... by qrohlf on Friday May 22, 2020 @01:21AM (#23268876)
This is actually pretty interesting to me, as I maintain a popular JS library [1] that depends on Chroma.js (similar lib to yours), and that dependency outweighs my first party code more than 3:1.

Do you have any plans to add interpolation functionality to ac-colors?

[1] https://github.com/qrohlf/trianglify

Re:Show HN: I Made JavaScript Color Conversion Library for L... by chrismorgan on Friday May 22, 2020 @08:08AM (#23271221)
Yeah, I was looking at chroma.js a day or two back and thinking “you call it ‘t̶i̶n̶y̶ small-ish’ [0]!? This thing is 40KB, 14KB gzipped [1], that’s by no means small!”

I’d expect such a library to be way smaller (I dunno, but less than 10KB/4KB), and preferably support tree-shaking so that I can just pick out the hcl() function, for example, if that’s all I want.

[0]: https://github.com/gka/chroma.js

[1]: https://bundlephobia.com/result?p=chroma-js

Re:Show HN: I Made JavaScript Color Conversion Library for L... by 07d046 on Friday May 22, 2020 @08:30AM (#23271357)
I don't know why it should be tiny, given what it's trying to do. Multiple kilobytes are dedicated to CSS color names and ColorBrewer scales, which don't compress well.

At the end of the source there's a section where you can comment out lines which should remove sections of the code when compressing it.

Re:Show HN: I Made JavaScript Color Conversion Library for L... by semantictags on Friday May 22, 2020 @03:19AM (#23269469)
I do now :)