If you just want to play around ASAP, the quickest way is to import the entire library, either as a module in your JS:
import Color from "https://colorjs.io/dist/color.js";
To be able to use
import statements in your JS, your
<script> element needs
Coloras a global variable, the classic way, just include the following script in your HTML:
You can also add
.min right before the
.js extension to get a minified file.
You can also import individual functions and use the tree-shakeable API.
npm install colorjs.io
Custom bundle generator coming soon! Until then, you can import individual modules yourself, either from
or your local
node_modules/colorjs.io if using npm.