A native version of Chroma.js that allows you to:
* use W3C X11 color names,
* cluster data points using algorithms: CkMeans, equal, head/tail, Jenks, logarithmic or quantile,
* create color scales,
* use different color spaces such as CMYK, HSLA, LAB, LCH and RGB,
* modify colors using interpolate, set/get alpha, lighten/darken, saturate/desaturate,
* compare colors using WCAG contrast,
* use existing color maps such as Brewer, cmocean, Material, Cividis, Turbo, Sinebow, Parula, Virdis, Plasma, Magma and Inferno.
There is an example site showing how to use the library.
yarn installyarn run makeyarn run testyarn run reviewyarn run full (test && review)yarn run benchmarks101 Data Points, Limits on an Apple M1, Chrome 96.0:
| Algorithm | Runs/Second |
| ------------- | ------------- |
| CkMeans | 846 |
| Equal | 48,311 |
| HeadTail | 32,197 |
| Jenks | 108 |
| Logarithmic | 48,017 |
| Quantile | 40,905 |##3 Documentation
yarn run local-docyarn run docelm bump
git add elm.json
git commit -m "2.0.0 - description of changes"
git tag 2.0.0
git push origin master 2.0.0
elm publishMany thanks to Indicatrix for supporting this project.