random-rec2020-color
Generate a random rec2020 color.
Installation
npm install --save random-rec2020-color
Usage
var randomRec2020Color = require('random-rec2020-color')
randomRec2020Color(); // => color(rec2020 74% 21% 45%)
randomRec2020Color(0, 1, 0, 1, 0, 1, 0, 1, true); // => color(rec2020 .33 .78 .62)
randomRec2020Color(0, 1, 0, 1, 0, 1, 0, 1); // => color(rec2020 10% 88% 42% / 62%)
randomRec2020Color(0, 1, 0, 1, 0, 1, 0, 1, true); // => color(rec2020 56% 21% 92% / 75%)
or
import randomRec2020Color from 'random-rec2020-color'
randomRec2020Color(); // => color(rec2020 74% 21% 45%)
randomRec2020Color(0, 1, 0, 1, 0, 1, 0, 1, true); // => color(rec2020 .33 .78 .62)
randomRec2020Color(0, 1, 0, 1, 0, 1, 0, 1); // => color(rec2020 10% 88% 42% / 62%)
randomRec2020Color(0, 1, 0, 1, 0, 1, 0, 1, true); // => color(rec2020 56% 21% 92% / 75%)
Acknowledgements
Inspired by random-hex-color by John Otander which is repackaged from a post by Paul Irish.
License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted for generative doings by Adam Morse (@mrmrs_).