# @terrazzo/react-color-picker

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

Latest version **0.3.1** (published 2026-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @terrazzo/react-color-picker
pnpm add @terrazzo/react-color-picker
yarn add @terrazzo/react-color-picker
bun add @terrazzo/react-color-picker
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2026-08-11 |
| First published | 2024-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 186 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 452 |
| Author | Drew Powers |
| Maintainers | drewpowers |
| Keywords | color, wcg, p3, oklab, oklch, hsl, picker |

## Links

- npm: https://www.npmjs.com/package/@terrazzo/react-color-picker
- Repository: https://github.com/terrazzoapp/terrazzo
- Homepage: https://terrazzo.app/docs/components/color-picker
- npm.io page: https://npm.io/package/@terrazzo/react-color-picker

## Dependencies (5)

- [clsx](https://npm.io/package/clsx.md) ^2.1.1
- [@terrazzo/icons](https://npm.io/package/@terrazzo/icons.md) ^0.1.2
- [@terrazzo/tiles](https://npm.io/package/@terrazzo/tiles.md) ^0.2.0
- [@terrazzo/tokens](https://npm.io/package/@terrazzo/tokens.md) ^0.2.0
- [@terrazzo/use-color](https://npm.io/package/@terrazzo/use-color.md) ^0.2.2

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.3.1 (latest) — 2026-08-11
- 0.2.2 (alpha) — 2026-02-28
- 0.3.0 — 2026-04-10
- 0.2.1 — 2026-02-23
- 0.2.0 — 2026-02-07
- 0.1.3 — 2025-07-20
- 0.1.2 — 2025-07-02
- 0.1.1 — 2025-06-26
- 0.1.0 — 2025-04-27
- 0.0.7 — 2025-01-30
- 0.0.4 — 2024-07-14
- 0.0.3 — 2024-07-01
- 0.0.2 — 2024-06-30
- 0.0.1 — 2024-06-29
- 0.0.0 — 2024-03-21

## 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 🌈 [Color.js](https://colorjs.io/).

`15 kB`, enforced by [size-limit](https://www.npmjs.com/package/size-limit)

## Setup

```sh
pnpm i @terrazzo/react-color-picker @terrazzo/tiles
```

```tsx
import ColorPicker from "@terrazzo/react-color-picker";
import { useState } from "react";

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

<ColorPicker color={color} setColor={setColor} colorSpaces={["srgb", "oklch", "oklab"]} />;
```

### Styling

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

```diff
+ 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.

---
_Source: https://npm.io/package/@terrazzo/react-color-picker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
