# @mzmap/color

> Easy way to convert color.

Latest version **0.0.3** (published 2018-03-14) · Apache License 2.0 license · 0 weekly downloads

## Install

```sh
npm install @mzmap/color
pnpm add @mzmap/color
yarn add @mzmap/color
bun add @mzmap/color
```

## 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.0.3 |
| Published | 2018-03-14 |
| First published | 2018-03-14 |
| Weekly downloads | 0 |
| License | Apache License 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zhangkaiqiang |
| Maintainers | zhangkaiqiang |

## Links

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

## Recent versions

- 0.0.3 (latest) — 2018-03-14
- 0.0.2 — 2018-03-14
- 0.0.1 — 2018-03-14

## README

# Color

Support color mode list:

- HSL
- HSLA
- RGB
- RGBA
- HSB

We will support CMYK, LAB in feature.

## Install

```bash
$ npm install @mzmap/color --save
```

## Usage

```javascript
import Color from '@mzmap/color'
```

## Create color methods

- fromRGB
- fromRGBA
- fromHSL
- fromHSLA
- fromHSB

## Get color array

- toRGB
- toRGBA
- toHSL
- toHSL
- toHSB

## Get color string

```javascript
// rgb(255, 255, 255) ==> rgba(255, 255, 255, 1)
Color.fromRGB('rgb(255, 255, 255)').toString('rgba')
```

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