https://github.com/syuilo/seed-color
Generate random color from a seed
https://github.com/syuilo/seed-color
nodejs
Last synced: 8 months ago
JSON representation
Generate random color from a seed
- Host: GitHub
- URL: https://github.com/syuilo/seed-color
- Owner: syuilo
- License: mit
- Created: 2016-06-20T18:59:10.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-08-05T05:33:06.000Z (almost 6 years ago)
- Last Synced: 2025-09-08T06:21:05.093Z (9 months ago)
- Topics: nodejs
- Language: TypeScript
- Size: 20.5 KB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
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.
## Install
``` shell
$ npm install seed-color --save
```
## Example
``` javascript
const seedColor = require('seed-color');
seedColor('hima').toHex(); // #d72c5d
seedColor('saku').toHex(); // #ae6e6c
```
### On TypeScript
Type definition are bundled.
``` typescript
import seedColor from 'seed-color';
```
## License
[MIT](LICENSE)
[npm-link]: https://www.npmjs.com/package/seed-color
[npm-badge]: https://img.shields.io/npm/v/seed-color.svg?style=flat-square
[mit]: http://opensource.org/licenses/MIT
[mit-badge]: https://img.shields.io/badge/license-MIT-444444.svg?style=flat-square