RGB/RGBA to Hex Color Parser
JSON →rgb2hex is a lightweight JavaScript library designed to parse RGB and RGBA color strings into their hexadecimal representation, including an alpha value for transparency. It operates without any external dependencies, making it suitable for environments where bundle size is critical. The current stable version is 0.2.5, released in November 2020. While updates have been infrequent since then, the library provides a focused solution for color conversion. A key differentiator is its minimal footprint and direct functionality, contrasting with larger color manipulation libraries that offer broader feature sets. It includes TypeScript type definitions for enhanced developer experience in modern projects. The library gained significant stability and security improvements between its early `v0.1.x` and `v0.2.x` releases, particularly addressing RegExp Denial of Service vulnerabilities.
Traffic · last 30 days ↑213% vs prev 7d
top countries 🇨🇦 Canada · 🇺🇸 United States · 🇩🇪 Germany · 🇫🇷 France · 🇳🇴 Norway