# @ripreact/hsl

> Minimal and fast HSLᵤᵥ implementation.

Latest version **1.2.2** (published 2019-11-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ripreact/hsl
pnpm add @ripreact/hsl
yarn add @ripreact/hsl
bun add @ripreact/hsl
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2019-11-23 |
| First published | 2019-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 704.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 4 |
| Author | Marina Miyaoka |
| Maintainers | miyaokamarina |

## Links

- npm: https://www.npmjs.com/package/@ripreact/hsl
- Repository: https://github.com/ripreact/hsl
- Homepage: https://github.com/ripreact/hsl#readme
- Issues: https://github.com/ripreact/hsl/issues
- npm.io page: https://npm.io/package/@ripreact/hsl

## Dependencies (2)

- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [cmake-js](https://npm.io/package/cmake-js.md) ^6.0.0

## Recent versions

- 1.2.2 (latest) — 2019-11-23
- 1.2.1 — 2019-11-22
- 1.1.4 — 2019-11-21
- 1.1.3 — 2019-11-18
- 1.1.1 — 2019-11-18
- 1.1.0 — 2019-11-17
- 1.0.1 — 2019-10-19
- 1.0.0 — 2019-10-18

## README

# @ripreact/hsl

> Minimal (≈670 bytes minigzip) and fast (up to 60% faster than original)
> partial [HSLᵤᵥ](http://hsluv.org) implementation with TypeScript support.

```bash
yarn add @ripreact/hsl
```

## Usage

```javascript
// ES module
import { hsl, hsla } from '@ripreact/hsl';

console.log(hsl(0, 100, 50)); //       → `'#ea0064'`
console.log(hsla(0, 100, 50, 0.5)); // → `'#ea006480'`
```

```javascript
// CommonJS
const { hsl, hsla } = require('@ripreact/hsl/cjs');

console.log(hsl(0, 100, 50));
console.log(hsla(0, 100, 50, 0.5));
```

> **NB:** By default `@ripreact/hsl` exports `*.mjs` module. If for some reasons
> you need ES module with `*.js` extension, use `@ripreact/hsl/esm` entry point.
> Also, you may specify `@ripreact/hsl/mjs` explicitly to import the same module
> as using default entry point.

## NAPI addon

```javascript
// Or `@ripreact/hsl/native/cjs` for CommonJS ↓
import { hsl, hsla } from '@ripreact/hsl/native/mjs';

console.log(hsl(0, 100, 50));
console.log(hsla(0, 100, 50, 0.5));
```

## License

MIT

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