Color String Parser

JSON →
library 2.0.2 ·javascript
verified May 27, 2026

color-parse is a fast and compact JavaScript library designed for parsing a wide array of CSS-compatible color strings into a structured object representation. It supports numerous formats including color keywords (e.g., 'red'), hex codes (`#RGB`, `#RRGGBB`, with optional alpha), functional notations like `rgb()`, `rgba()`, `hsl()`, `hsla()`, `hwb()`, `cmyk()`, and modern color spaces such as `xyz()`, `luv()`, `lab()`, `lch()`, `oklab()`, `oklch()`, and the generic `color()` function. Additionally, it can parse custom formats like `R:10 G:20 B:30` and array-like inputs. The library currently ships as version 2.0.2 and is actively maintained. It emphasizes performance and minimal bundle size, differentiating itself from alternatives by focusing solely on parsing without performing color space conversions, which helps keep its footprint small compared to libraries like `parse-color` or `color-string` that offer extensive conversion APIs.

total hits 21
actors 8 distinct systems
last hit 6d ago MetaBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France