Chroma Panel

Search documentation

Find a page or section

Entry points

Import only the modes you use and the bundle gets smaller.

Importing chroma-panel registers all five modes. Import the shell and add modes yourself to cut that down.

import { ChromaPanel } from "chroma-panel/panel";
import "chroma-panel/wheel";
 
<ChromaPanel modes={["wheel"]} />;
What you importAdded to your app
all five modes22.2 kB
shell plus one mode14.1 kB

The subpaths

Entry pointWhat it holds
chroma-panelEverything, with all five modes registered
chroma-panel/panelThe panel shell, no modes
chroma-panel/coreThe colour engine, no React
chroma-panel/wheelThe wheel mode
chroma-panel/slidersThe sliders mode
chroma-panel/palettesThe palettes mode
chroma-panel/imageThe image mode
chroma-panel/pencilsThe pencils mode
chroma-panel/named-colorsThe 148 CSS colour names
chroma-panel/contrastAPCA and WCAG helpers
chroma-panel/image-workerThe worker for off-thread sampling
chroma-panel/style.cssThe stylesheet

Import modes for the side effect

A mode entry point registers itself. Write import "chroma-panel/wheel", not a named import, or a bundler may drop it.