# color-parser

> CSS color string parser

Latest version **0.1.0** (published 2012-12-11) · 0 weekly downloads

## Install

```sh
npm install color-parser
pnpm add color-parser
yarn add color-parser
bun add color-parser
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2012-12-11 |
| First published | 2012-09-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tjholowaychuk |
| Keywords | color, parse, parser, css |

## Links

- npm: https://www.npmjs.com/package/color-parser
- npm.io page: https://npm.io/package/color-parser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2012-12-11
- 0.0.1 — 2012-09-12

## README

# color-parser

  CSS color string parser

## Installation

    $ component install component/color-parser

### Example

```js
var parse = require('color-parser');

parse('#fc0')
// => { r: 255, g: 204, b: 0, a: 1 }

parse('#ffcc00')
// => { r: 255, g: 204, b: 0, a: 1 }

parse('rgb(255, 204, 0)')
// => { r: 255, g: 204, b: 0, a: 1 }

parse('rgba(255, 204, 0, 1)')
// => { r: 255, g: 204, b: 0, a: 1 }
```

# License

  MIT

---
_Source: https://npm.io/package/color-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
