JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 999630
  • Score
    100M100P100Q184511F
  • License MIT

Color parser

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 Build Status Code Climate

Parse color values from a string. Highly inspired by substack’s parse-color, except for it doesn’t do extra conversions to each possible space, which results in reduced color-convert dependency and increased speed. Also it tries to parse some additional CSS4 color functions, like hwb, gray, named hue etc. The goal of project is to provide atomic css 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 }
  • color-parser — parser by TJ. Supports limited set of spaces.
  • parse-color — parser by James Halliday. Performs calculations to every possible space.
  • color-string — color parsing/serializing module by Heather Arthur. Has extensive API for parsing and serializing from any to any space.

NPM