Getting startedWhy use Encodable?Contributing guidelinesAbout
Gallery
Guides
Encodable API
Submodule API
@encodable/color
Utilities for managing color schemes and color scales. Built on top of D3.
Install
npm install @encodable/color global-box
Example usage
import { getColorSchemeRegistry } from '@encodable/color';/* Get color schemes by name */getColorSchemeRegistry().get(schemeName);// Get categorical schemegetColorSchemeRegistry().categorical.get(schemeName);// Get sequential schemegetColorSchemeRegistry().sequential.get(schemeName);// Get diverging schemegetColorSchemeRegistry().diverging.get(schemeName);// Register color schemegetColorSchemeRegistry().register({type: 'categorical',id: 'my-scheme',colors: [...],});
The library also includes all schemes from d3-scale-chromatic
by default.