{"_id":"random-color","_rev":"18-89c682616bddd8bb856da72c2c74e3a9","name":"random-color","time":{"modified":"2022-06-25T11:19:39.836Z","created":"2013-06-17T05:24:06.158Z","0.0.0":"2013-06-17T05:24:08.768Z","0.0.1":"2014-08-15T07:07:29.624Z","2.0.0":"2016-03-22T23:50:50.526Z","0.0.1-security":"2016-03-23T22:21:12.590Z","0.0.2":"2016-04-10T23:46:00.070Z","1.0.0":"2016-04-18T03:58:13.186Z","1.0.1":"2016-04-26T13:41:53.139Z"},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"dist-tags":{"latest":"1.0.1"},"readme":"# random-color\n\n> Generate random colors based on the golden ratio, which are more visually pleasing.\n  \n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/mock-end/random-color/blob/master/LICENSE)\n\n[![build:?](https://img.shields.io/travis/mock-end/random-color/master.svg?style=flat-square)](https://travis-ci.org/mock-end/random-color)\n[![coverage:?](https://img.shields.io/coveralls/mock-end/random-color/master.svg?style=flat-square)](https://coveralls.io/github/mock-end/random-color)\n  \n\nThis module is deeply inspired by Martin Ankerl's [blog post](http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/). \n\nThe generated colors are more visually pleasing together than a simple random color generator because they are computed by moving around the color wheel in increments of the golden ratio. By default, the generated colors can used as a background for legible black text, but the color generator can be customized for other uses.\n\n\n## Install\n\n```\n$ npm install --save random-color\n```\n\n## Usage\n\n```js\nvar randomColor = require('random-color');\n\n// API\n// - randomColor([saturation, value]);\n```\n\nBy default, generate a color with `saturation = 0.5` and `value = 0.95`. \n\nReturns [color](https://github.com/harthur/color) object so you can convert the color to any color-formats easily.\n\n```js\nvar color = randomColor();\n\n// ref: https://github.com/harthur/color\ncolor.hexString(); // => '#d67118'\ncolor.rgbString(); // => 'rgb(110,52,164)'\n```\n![saturation=0.5, value=0.95](img/1.png?raw=true \"saturation=0.5, value=0.95\")\n\n\nOptionally specify `saturation` and `value`:\n\n```js\nvar color = randomColor(0.99, 0.99);\n```\n![saturation=0.99, value=0.99](img/2.png?raw=true \"saturation=0.99, value=0.99\")\n\n```js\nvar color = randomColor(0.3, 0.99);\n```\n![saturation=0.3, value=0.99](img/1.png?raw=true \"saturation=0.3, value=0.99\")\n\n## Contributing\n\nPull requests and stars are highly welcome.\n\nFor bugs and feature requests, please [create an issue](https://github.com/mock-end/random-color/issues/new).\n","versions":{"2.0.0":{"name":"random-color","version":"2.0.0","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","_id":"random-color@2.0.0","_shasum":"31c4d8c81c7d30a425869fa1b1f53c9c4efea062","_from":".","_npmVersion":"3.7.2","_nodeVersion":"4.3.0","_npmUser":{"name":"nj48","email":"spam@njohnson.me"},"dist":{"shasum":"31c4d8c81c7d30a425869fa1b1f53c9c4efea062","tarball":"https://registry.npmjs.org/random-color/-/random-color-2.0.0.tgz","integrity":"sha512-6U35T9/aR63a0lWYgLC+t6pmeZerBY2jX6GadOcSN2Sw94viX9Wn4CVGt6/GdYswbusEe7SvW01RrfzubGWEvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICwQ2PR95IOKm8QcThdlhNCSLuqkD83HozvQLNCWEQ4fAiAwhHQMAcJARoWf1jjBm3MAVXRUYhB6WKDjsIMGBgbrfQ=="}]},"maintainers":[{"name":"nj48","email":"spam@njohnson.me"}],"directories":{}},"0.0.1-security":{"name":"random-color","version":"0.0.1-security","description":"This package name is not currently in use, but was formerly occupied by a popular package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/npm/security-holder.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/npm/security-holder/issues"},"homepage":"https://github.com/npm/security-holder#readme","gitHead":"d1719e2a152734ed854065de56039770c9104d83","_id":"random-color@0.0.1-security","_shasum":"e0cadac1f301f6ceb5b41991840a98d8a5fbe680","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.1.0","_npmUser":{"name":"npm","email":"npm@npmjs.com"},"dist":{"shasum":"e0cadac1f301f6ceb5b41991840a98d8a5fbe680","tarball":"https://registry.npmjs.org/random-color/-/random-color-0.0.1-security.tgz","integrity":"sha512-yGy+rCKeVYEQvHN+k+ut1n4geN1AF3InCijMrSoAcnhi8tE/X36PfmyGoHM6V5Ns/5tSJbFOK+cGz7QIJ0lM5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWD4MKDDNMkTHg8WaXylEO1lg2yCVDypZ2f1GKmiL/hAIgZQOK7LiTyUCHVAL8dkdTZDt/TT+L4kGOE8PSTPo+J5A="}]},"maintainers":[{"name":"nj48","email":"spam@njohnson.me"}],"directories":{}},"0.0.0":{"name":"random-color","version":"0.0.0","description":"Module to generate random RGB colors","main":"index.js","scripts":{"test":"fox"},"keywords":["random","color","rgb"],"devDependencies":{"fox":"*"},"repository":{"url":"git@github.com:azer/random-color.git","type":"git"},"author":"Azer Koçulu <azer@kodfabrik.com>","license":"BSD","_id":"random-color@0.0.0","_npmVersion":"0.0.0-fake","_nodeVersion":"0.0.0-fake","_shasum":"37cd9a1b5cd29c1cee3a640f0e64f819e0fa87ce","_npmUser":{"name":"npm","email":"support@npmjs.com"},"_from":".","dist":{"shasum":"37cd9a1b5cd29c1cee3a640f0e64f819e0fa87ce","tarball":"https://registry.npmjs.org/random-color/-/random-color-0.0.0.tgz","integrity":"sha512-jD7Yp9aoOzKZFh5lZMAJNmO6wbTFPOYfZYdvBrBM+i+ioMObuIwZLbDQNGT+oOCGQ/LKJsoWguoxfwzBsZAo5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrBAAF7t0f0b80PD8gjt/k8EhGh6O+JgZ4YN0Y8l9AWwIhAKOFq84azjZk+Otoe869ZBsjKgA0r805wDntsd2DMudd"}]},"maintainers":[{"name":"nj48","email":"spam@njohnson.me"}],"directories":{}},"0.0.1":{"name":"random-color","version":"0.0.1","description":"Module to generate random RGB colors","main":"index.js","scripts":{"test":"fox"},"keywords":["random","color","rgb"],"devDependencies":{"prova":"*"},"repository":{"url":"git@github.com:azer/random-color.git","type":"git"},"author":"Azer Koçulu <azer@kodfabrik.com>","license":"BSD","dependencies":{"rnd":"0.0.0"},"_id":"random-color@0.0.1","_npmVersion":"0.0.0-fake","_nodeVersion":"0.0.0-fake","_shasum":"a5247eece4c720992b2c9dea5558d09ef3d4a054","_npmUser":{"name":"npm","email":"support@npmjs.com"},"_from":".","dist":{"shasum":"a5247eece4c720992b2c9dea5558d09ef3d4a054","tarball":"https://registry.npmjs.org/random-color/-/random-color-0.0.1.tgz","integrity":"sha512-pd+fHaR6IaR01PlwQiA+w0z7zEQzu9sJx6mbvppvda6NEJtz7iYofWP2LZWhZ5VHN9fUjP7KEMvFU0QpBuOj6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEosWQWEcgc/A+sgixX3kD0pd1iUSqM8MtE4/YLZxtNpAiAcjKHFUn5YU2DCS0A6TfYArcON/R6W1+6pVFJmBk0rTQ=="}]},"maintainers":[{"name":"nj48","email":"spam@njohnson.me"}],"directories":{}},"0.0.2":{"name":"random-color","version":"0.0.2","description":"Generate a random color.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/random-color.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com","url":"https://github.com/bubkoo"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/random-color/issues"},"homepage":"https://github.com/bubkoo/random-color#readme","gitHead":"56036b7c045f72041f7f043013dce2e25a18826e","_id":"random-color@0.0.2","_shasum":"a3385f0d0908d0da840be5fb97e9d142ca25966b","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"a3385f0d0908d0da840be5fb97e9d142ca25966b","tarball":"https://registry.npmjs.org/random-color/-/random-color-0.0.2.tgz","integrity":"sha512-KV+9nbM26jawA3IPESZUfAsvmDZCHOBpUBKy7pK1bUTHWMS5rp8q8Er3cYuI2CwQUZ4/ZSCgQCX1nXbMalHGfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZtCUBmHjeCNREZ+vZlFy7Xvp5L7MkF12tQu8FTPrSmQIhAOMWuwf/2fRQfFvFLy2B5vU+thUK59StW71b0oNUEKf5"}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-color-0.0.2.tgz_1460331957641_0.9207219933159649"},"directories":{}},"1.0.0":{"name":"random-color","version":"1.0.0","description":"Generate a random color.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["color","lorem","randomly","random","rand","sampling","generator","generate","gen"],"license":"MIT","author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-color.git"},"bugs":{"url":"https://github.com/mock-end/random-color/issues"},"homepage":"https://github.com/mock-end/random-color#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"gitHead":"31ea0963ac651e3a8c040ca787b9f9299af9fe67","_id":"random-color@1.0.0","_shasum":"23ca63a4e16f11c03692146e31cdeb52ff927a2b","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"23ca63a4e16f11c03692146e31cdeb52ff927a2b","tarball":"https://registry.npmjs.org/random-color/-/random-color-1.0.0.tgz","integrity":"sha512-kyUXlyWaZZQW6TPxAcaIFxapjfn8L435nRRF6oxKUQYyvO4BXhtUgEZ9iEICZTGWcfVC+l8fj/6r2ZQHXTUzlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMBj7aJyIJtjkDqRlOPe6isRRYV+b0u5SVNb0f6y5YwAiBInAFBFsHFcxzaY7BmsTrrHqARBTszFxqIvPPBpls2Gg=="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-color-1.0.0.tgz_1460951892772_0.6464151542168111"},"directories":{}},"1.0.1":{"name":"random-color","version":"1.0.1","description":"Generate random colors based on the golden ratio, which are more visually pleasing.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["color","rgb","hex","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-color.git"},"bugs":{"url":"https://github.com/mock-end/random-color/issues"},"homepage":"https://github.com/mock-end/random-color#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"color":"^0.11.1"},"gitHead":"0ab2855e633b6a1a20b182288a5853e0fe2c746e","_id":"random-color@1.0.1","_shasum":"fcfde5d054eefed8b90a8e39ebb06973c40253b1","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"fcfde5d054eefed8b90a8e39ebb06973c40253b1","tarball":"https://registry.npmjs.org/random-color/-/random-color-1.0.1.tgz","integrity":"sha512-6IV6i3HHKluwo6GmRtgestd1nABtFrwUrmJ2rQpymwQt8/X2ZoC7z8SWxeF9KC8FoBFEAuHpwWI76uJ19+2j8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3SC20kP6n2aOIWsyL2SXx6hLSUwwdwhIlAqNJw6pHNgIgOdJf8pJChKgPRU6tvbn5mPqKWMWw6ujT2d+ld+ie854="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-color-1.0.1.tgz_1461678112597_0.7543567435350269"},"directories":{}}},"license":"MIT","readmeFilename":"README.md","description":"Generate random colors based on the golden ratio, which are more visually pleasing.","homepage":"https://github.com/mock-end/random-color#readme","repository":{"type":"git","url":"git+https://github.com/mock-end/random-color.git"},"bugs":{"url":"https://github.com/mock-end/random-color/issues"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"keywords":["color","rgb","hex","random","randomly","randomize","chance","test","dice","mock"],"users":{"uniquerockrz":true,"myorkgitis":true,"hualei":true}}