# @sphinxxxx/color-conversion

> Convert colors between RGBA/HSLA/Hex

Latest version **2.2.2** (published 2019-08-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install @sphinxxxx/color-conversion
pnpm add @sphinxxxx/color-conversion
yarn add @sphinxxxx/color-conversion
bun add @sphinxxxx/color-conversion
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.2 |
| Published | 2019-08-02 |
| First published | 2018-02-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 35.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joudee |
| Maintainers | sphinxxxx |

## Links

- npm: https://www.npmjs.com/package/@sphinxxxx/color-conversion
- Repository: https://github.com/Sphinxxxx/color-conversion
- Issues: https://github.com/Sphinxxxx/color-conversion/issues
- npm.io page: https://npm.io/package/@sphinxxxx/color-conversion

## Recent versions

- 2.2.2 (latest) — 2019-08-02
- 2.2.1 — 2019-01-11
- 2.2.0 — 2018-11-12
- 2.1.1 — 2018-05-20
- 2.1.0 — 2018-05-20
- 2.0.0 — 2018-04-10
- 2.0.0-alpha.3 — 2018-02-23
- 2.0.0-alpha.2 — 2018-02-23

## README

# color-conversion

JavaScript library for color conversion and manipulation with support for CSS color syntax.

Demo: https://rawgit.com/Sphinxxxx/color-conversion/master/demo/index.html

## Usage

```js
<script src="https://unpkg.com/@sphinxxxx/color-conversion@2"></script>

<script>
    //rgba/hsla/hex string, CSS color name, or rgba array:
    var color = new Color('rgb(200, 250, 0)');
    
    color.hsla;  // [0.2, 1, 0.49, 1]
    color.rgba;  // [200, 250, 0, 1]
    
    color.hslaString;  // "hsla(72,100%,49.02%,1)"
    color.rgbaString;  // "rgba(200,250,0,1)"
    color.hex;         // "#c8fa00ff"
</script>
```

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