random-rec2020-color

1.0.0 • Public • Published

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted for generative doings by Adam Morse (@mrmrs_).


Package Sidebar

Install

npm i random-rec2020-color

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.68 kB

Total Files

4

Last publish

Collaborators

  • mrmrs