Package Exports
- color-parse
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-parse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
color-parse

Atomic color string parser with tiny automatable API.
$ npm install color-parse
var parse = require('color-parse');
parse('hsla(12, 10%, 50%, .3)'); //{ space: 'hsl', values: [12, 10, 50], alpha: 0.3 }
Parsed strings
-
rgb()
,rgba()
-
hsl()
,hsla()
inc. named hues -
hwb()
-
cmyk()
-
xyz()
-
lab()
-
lch()
-
luv()
-
#RGB
-
#RGBA
-
#RRGGBB
-
#RRGGBBAA
-
R:0 G:0 B:0
-
(R0 / G0 / B0)
-
C100/M80/Y0/K35
Related
- parse-color — parser by James Halliday. Initially inspired by that awesome parser. It performs calculations to every possible space which results in bloated size of lib.
- color-parser — parser by TJ. Supports limited set of spaces.
- color-string — color parsing/serializing module by Heather Arthur. Has extensive API for parsing and serializing from any to any space.