https://github.com/vasanthv/flat-color-generator
Flat color generator based on Mariam Maarouf's flat-color-generator. https://github.com/mariamrf/flat-color-generator
https://github.com/vasanthv/flat-color-generator
Last synced: over 1 year ago
JSON representation
Flat color generator based on Mariam Maarouf's flat-color-generator. https://github.com/mariamrf/flat-color-generator
- Host: GitHub
- URL: https://github.com/vasanthv/flat-color-generator
- Owner: vasanthv
- License: mit
- Created: 2018-04-08T14:01:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-08T16:34:28.000Z (about 8 years ago)
- Last Synced: 2025-03-20T08:24:41.779Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flat-color-generator
Flat color generator based on Mariam Maarouf's [flat-color-generator](https://github.com/mariamrf/flat-color-generator)
Read the original documentation by Mariam Maarouf [here](https://github.com/mariamrf/flat-color-generator)
## Install
Install using [npm](https://npmjs.com/).
```
npm install flat-color-generator
```
## Usage
```js
const flatuicolor = require('flat-color-generator');
const color = flatuicolor();
console.log(color.hex); // prints the hex value of the color
```
You can pass in an optional hue value to choose a random color from that hue value/degree.
```js
const hue = 45;
const color = flatuicolor(hue);
```
The return object has the following properties:
| property | |
|----------|------------------------|
| h | hue |
| s | saturation |
| v | value |
| r | red |
| g | green |
| b | blue |
| hex | hex value of the color |
## Credits
[flat-color-generator](https://github.com/mariamrf/flat-color-generator) by Mariam Maarouf
## Licence
MIT