UNPKG

@terrazzo/react-color-picker

Version:

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

22 lines 790 B
import { type default as useColor } from '@terrazzo/use-color'; import { type ComponentProps } from 'react'; import './ColorPicker.css'; /** sRGB → P3 → Rec2020 */ export type Gamut = 'rgb' | 'p3' | 'rec2020'; export declare const COLOR_PICKER_SPACES: { rgb: string; oklab: string; lab: string; oklch: string; lch: string; okhsl: string; xyz50: string; xyz65: string; }; export interface ColorPickerProps extends Omit<ComponentProps<'div'>, 'color'> { /** value from useColor() */ color: ReturnType<typeof useColor>[0]; setColor: ReturnType<typeof useColor>[1]; } export default function ColorPicker({ className, color, setColor, ...rest }: ColorPickerProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=ColorPicker.d.ts.map