Colormaps
A package for the colormaps.io API.
Table of Contents
Installation
You can install this package from NPM:
npm add colormaps
Or with Yarn:
yarn add colormaps
CDN
For CDN, you can use unpkg:
https://unpkg.com/colormaps/dist/bundles/colormaps.umd.min.js
The global namespace for colormaps is colormaps
:
const getList = colormaps;const items = await ;
Usage
ES6
Get the list of colormap names:
;;
Get a colormap by name:
;;// Get it in a different format;
Get a random colormap:
;; // Colormap with 2 colors
Get a random color:
;;
Search a colormap by name:
;;
Search a colormap by Euclidean distance:
;;
CommonJS
Get the list of colormap names:
;;
Contribute
Releases are handled automatically by the CI using semantic-release.
If you wish to contribute, please use the following guidelines:
- Use Conventional Commits
- Use
[ci skip]
in commit messages to skip a build