This library, `chartjs-color-string`, provides utilities for parsing and generating CSS color strings in various formats, including named colors, hex, rgb(a), and hsl(a). It outputs color components as numerical arrays. While it is part of the Chart.js ecosystem, its latest version, 0.6.0, was published over seven years ago, indicating a mature and stable, but infrequently updated, project. It supports modern CSS color string formats like `#rgba` and `#rrggbbaa` since version 0.6.0 and case-insensitive parsing of RGB(A) strings since 0.5.0. Its primary differentiator is its lightweight focus on string conversion, making it suitable for environments where a full-featured color manipulation library is not needed. The package should be considered in maintenance mode.
npm install chartjs-color-stringVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to parse various CSS color strings into numerical arrays and how to generate CSS color strings from numerical arrays using the imported `colorString` object.
Always install the correct package using `npm install chartjs-color-string`.
Be aware of the package's maintenance status. For projects requiring active development, newer CSS color features, or more comprehensive color manipulation, consider alternative actively maintained libraries.
Uninstall the incorrect package (`npm uninstall color-string`) and install the correct one (`npm install chartjs-color-string`). Ensure your import statements are `import * as colorString from 'chartjs-color-string';` or `const colorString = require('chartjs-color-string');`.Verify that you have installed `chartjs-color-string` correctly. If not, run `npm install chartjs-color-string`. If `color-string` was installed by mistake, remove it (`npm uninstall color-string`) and install the correct package.
No dependency data recorded yet.