I open-sourced the color and gradient picker from our design editor (React + Vue)
I needed a picker for Orshot's template editor that wouldn't break on real CSS. The one we used threw on valid values and had no room for brand or saved colors, so I built my own
- Takes any CSS color or gradient string and returns one, untouched parts stay exactly as written
- Linear, radial, conic and repeating gradients
- hex, rgb, hsl, oklch, eyedropper, Cmd+V to paste any color
- Swatch groups (brand, saved, recent), keyboard and screen reader support
- Zero-dep core, ~14 KB gzipped, MIT
GitHub: https://github.com/rishimohan/colorshot
Live demos: https://orshot.com/open-source/colorshot
Feedback on the API or how dragging feels would help a lot