# rgb

> converts all sorts of colors to rgb format.

Latest version **0.1.0** (published 2014-05-01) · MIT (http://mootools.net/license.txt) license · 0 weekly downloads

## Install

```sh
npm install rgb
pnpm add rgb
yarn add rgb
bun add rgb
```

Provides the command `rgb`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-05-01 |
| First published | 2013-06-03 |
| Weekly downloads | 0 |
| License | MIT (http://mootools.net/license.txt) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Valerio Proietti |
| Maintainers | kamicane |
| Keywords | rgb, hsl, hex, color, conversion |

## Links

- npm: https://www.npmjs.com/package/rgb
- Repository: https://github.com/kamicane/rgb
- Issues: https://github.com/kamicane/rgb/issues
- npm.io page: https://npm.io/package/rgb

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-05-01
- 0.0.1 — 2013-06-07
- 0.0.0 — 2013-06-03

## README

rgb
===

converts all sorts of colors to rgb format

basic usage
-----------

```js
var color = require("rgb")

color("hsl(50, 50, 50)") //'rgb(191,170,64)'
color("#000") //'rgb(0,0,0)'
color("hsl(50, 50, 50, 0.5)") //'rgba(191,170,64,0.5)'
color("maroon") //'rgb(128,0,0)'
color("#ff330033") //'rgba(255,51,0,0.2)'
```

matches
-------

```js
var color = require("rgb")

color.matches("#ff330033") //true
```

replace
-------

```js
var color = require("rgb")

color.replace("the color is #ff330033") //'the color is rgba(255,51,0,0.2)'

color.replace("the color is #ff330033", function(match){
    return color(match)
}) //'the color is rgba(255,51,0,0.2)'
```

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