seed-color
Version:
Generate random colors from a seed
36 lines (27 loc) • 868 B
Markdown
seed-color
-------------------------------
[![][npm-badge]][npm-link]
[![][mit-badge]][mit]
Generate random color from a seed.
For example, such as when you want to generate a unique color from the values, such as IP address and ID.
``` shell
$ npm install seed-color --save
```
``` javascript
const seedColor = require('seed-color');
seedColor('hima').toHex(); // #d72c5d
seedColor('saku').toHex(); // #ae6e6c
```
Type definition are bundled.
``` typescript
import seedColor from 'seed-color';
```
[](LICENSE)
[]: https://www.npmjs.com/package/seed-color
[]: https://img.shields.io/npm/v/seed-color.svg?style=flat-square
[]: http://opensource.org/licenses/MIT
[]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square