7 ms·
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 outweigh
by qrohlf 6y ago
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 https://github.com/qrohlf/trianglify
- semantictags 6y agoI do now :)
- chrismorgan 6y agoYeah, 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 https://github.com/gka/chroma.js [1]: https://bundlephobia.com/result?p=chroma-js https://bundlephobia.com/result?p=chroma-js
- 07d046 6y agoI 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.