# random-open-color

> Super fast random color generator from the open-color palette

Latest version **1.2.0** (published 2017-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install random-open-color
pnpm add random-open-color
yarn add random-open-color
bun add random-open-color
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-11-15 |
| First published | 2017-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Christoph Biering |
| Maintainers | chryb |
| Keywords | color, random, open-color, palette, generator, hex |

## Links

- npm: https://www.npmjs.com/package/random-open-color
- Repository: https://github.com/chryb/random-open-color
- Homepage: https://github.com/chryb/random-open-color#readme
- Issues: https://github.com/chryb/random-open-color/issues
- npm.io page: https://npm.io/package/random-open-color

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [random-js](https://npm.io/package/random-js.md) ^1.0.8
- [shuffle-array](https://npm.io/package/shuffle-array.md) ^1.0.1

## 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

- 1.2.0 (latest) — 2017-11-15
- 1.1.0 — 2017-10-11
- 1.0.1 — 2017-10-09
- 1.0.0 — 2017-10-08

## README

# random-open-color

> Super fast random color generator from the [open-color](https://github.com/yeun/open-color) palette

## Install

```bash
npm install --save random-open-color
```

## Usage

```javascript
const randomColor = require('random-open-color')

import randomColor from 'random-open-color')

const hexColor = randomColor([options = {}])
// returns -> '#h??????'
```
### Options

You can specify an `options` object to modify the random color generator.

|Property|Type|Default|Description|
|:--:|:--:|:--:|:--|
|`excluded`|Array<String>|`[]`|All colors in the array will be excluded from the random generator|
|`min`|Number|`0`|The minimal range of color selection. For example if you specify `min = 1` all colors lower than `2` will be excluded|
|`max`|Number|`9`|The maximal range of color selection.|
|`shuffle`|Boolean|`false`|If shuffle is true, ...|

/*import randomColor from 'random-open-color'

randomColor({
  excluded: [
    'gray'
  ],
  min: 2, // min >= 0 && min < max
  max: 8, // max > min && max <= 9
  shuffle: true
})*/

## License

Copyright (c) 2017 Christoph Biering, Licensed under the [MIT license](./LICENSE).

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