Pickr is a JavaScript color-picker widget with no jQuery dependency. It works with common CSS frameworks and supports alpha and several color formats.
Overview
Pickr is a flat, responsive color-picker library meant to embed in web pages and apps. It ships Classic, Monolith, and Nano themes, with Nano using CSS grid for layout. You install via npm or yarn, or load minified CSS and JS from a CDN.
The picker exposes an event-driven API for init, show, hide, change, save, clear, and swatch selection. Colors are handled as HSVa objects convertible to RGBA, HSLA, HEXA, CMYK, and related string forms. Options cover opacity, swatches, internationalization, shadow DOM targets, and using an external input as the trigger button.
Features include mouse-wheel fine tuning, touch support, accessibility-oriented behavior, and comparison of current versus selected colors. The maintainer notes the feature set is frozen beyond security and bug fixes, with no ES5 build in recent releases.
Multiple instances are created by keeping separate Pickr references, often binding each to its own DOM element rather than shared CSS selectors.
Key features
- Classic, Monolith, and Nano themes
- Zero npm runtime dependencies
- RGBA, HSLA, HSVA, and HEX formats
- Opacity and swatch quick picks
- Event-driven picker API
- Shadow DOM element targeting
- Touch and responsive positioning
- Optional external input as button
Use cases
- Theme and accent color selectors
- Form fields needing alpha colors
- Design tools in Bootstrap-style UIs
- Accessible color inputs on mobile
- CMS or admin panel styling controls