Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@terrazzo/react-color-picker

git+terrazzoapp1.1kMIT0.1.3TypeScript support: included

React color picker that supports Color Module 4, wide color gamut (WCG), and Display-P3 using WebGL for monitor-accurate colors. Powered by Culori.

color, wcg, p3, oklab, oklch, hsl, picker

readme

@terrazzo/react-color-picker

Pick colors using CSS Color Module 4, wide color gamut (WCG), and all supported web colorspaces using React and WebGL for monitor-accurate colors. Powered by 🌈 Culori.

15 kB, enforced by size-limit

Setup

pnpm i @terrazzo/react-color-picker @terrazzo/tiles
import ColorPicker from "@terrazzo/react-color-picker";
import { useState } from "react";

const [color, setColor] = useState("color(display-p3 0 0.3 1)");

<ColorPicker value={color} onChange={setColor} />;

Styling

To use the default styles, import both @terrazzo/tiles and @terrazzo/react-color-picker CSS:

+ import "@terrazzo/tiles/all-components.css";
+ import "@terrazzo/react-color-picker/styles.css";

Or, you can copy both of those files manually into your own styling, and customize/delete what you don’t use.

changelog

@terrazzo/react-color-picker

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.0.7

Patch Changes