Wide-Gamut Colors
Support for sRGB, Display P3, Rec2020, and more. Automatic gamut detection shows you which color space contains your color.
Wide-Gamut Colors
Support for sRGB, Display P3, Rec2020, and more. Automatic gamut detection shows you which color space contains your color.
Multiple Color Spaces
Choose from sRGB, HSL, HWB, LAB, LCH, OKLCH, OKLAB, and wide-gamut RGB spaces. Convert between them seamlessly.
Area Picker
Interactive 2D color area for intuitive selection. Adapts to the active color space with pointer drag and keyboard arrow-key support.
Signals & Reactivity
Powered by Preact Signals for efficient, fine-grained reactivity. Shadow DOM encapsulation keeps styles isolated.
CSS Parts
Customize every part of the picker with ::part() selectors. Style the
trigger, panel, sliders, and more.
Small Bundle
Tree-shakeable ES modules. Color math by colorjs.io. No framework dependencies.
— <color-input value="#0bf8"></color-input>Try it on Codepen!
<script type="module"> import 'https://cdn.jsdelivr.net/gh/argyleink/css-color-component/dist/index.js'</script>
<color-input value="oklch(75% 30% 180)"></color-input>—