{"name":"flame-gradient","version":"1.0.0","description":"Input a number between 0 and 1, get an rgb value on a smooth gradient from dark to bright","main":"index.js","scripts":{"test":"standard | snazzy && tap --no-cov test/test.js","view":"node test/view.js","cov":"tap --100 test/test.js"},"repository":{"type":"git","url":"git+https://github.com/AlanSl/flame-gradient.git"},"keywords":["gradient","color","visualization","easing","gradient"],"author":{"name":"Alan Slater"},"license":"MIT","bugs":{"url":"https://github.com/AlanSl/flame-gradient/issues"},"homepage":"https://github.com/AlanSl/flame-gradient#readme","dependencies":{"sinusoidal-decimal":"^1.0.0"},"devDependencies":{"ajv":"^6.5.4","browserify":"^16.2.2","opn":"^5.4.0","pump":"^3.0.0","snazzy":"^8.0.0","standard":"^12.0.1","stream-template":"0.0.10","tap":"^12.0.1"},"gitHead":"d332adcc9399bb7c854ca9672b825d41f6b1f773","_id":"flame-gradient@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.9.0","_npmUser":{"name":"alan.slater","email":"alan.slater@nearform.com"},"dist":{"integrity":"sha512-9ejk16/DqvQJ4dHsh68W/4N0zmVQ60zukyUuEHrTbf5pJvP4JqlIdke86Z9174PZokRCXAntY5+H1txSyC7mUA==","shasum":"c7223ba63c60d6ea52a60478318997f925dfccbb","tarball":"http://registry-npm.ywwl.com/flame-gradient/download/flame-gradient-1.0.0.tgz","fileCount":20,"unpackedSize":103606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqmG7CRA9TVsSAnZWagAATn8P/3826AdA2vLCm5bunkC7\n5n1hO+77p+dABGChoJ7XKaTjAswggcRoLavv6ywtWnsANdEegs/v1kmQ4z9V\njFC2Kd6R54OSxQHSLdBcHVHE8n7QCJGX2pfWKGCw5wNM39eTlVKme+T0WGQd\naIsrOlQXAItKO2NG16Th9ctAJ92mKSbN/LbLqzrLDUTsXePQSUjVfTLs0g6G\nqtmwcZXtC+a9kho33Cr9JdCIMM/+jDO3j9oKtS0+e1pA69O5XqKhSSsCrzGb\nwdyhH0a2wNBp7W2uyfgzI7RVg3jHCyu6+QV2a+PioLkbZugGQ5vG4ctGk9C/\nwejyD3sKrP+YJhqGWZr6zP1LkHj3eExsWnoAZtDFZ/lA44ZvAhc2pstAG/17\n8laOJra6ZDTOI17Gpf3VWr7SfM2IqBAupSjcqVDq9ACDSAVtms+BgWatWviY\nQcUZQwC2C/zrz7/987jvhiAROST6R3FXVTAhajqnmVsOjcyacVrqeOAQv6rx\nIQIXa7p1pUprO+Nm7em76OMkItGPYu535ooZkKLbIsdD+E75wcycITpWsOV/\nqPuJ88/OaWr48yq+t1cpIldBSqtrGg78j/6SJ7IjtSRr2oL622xucsIFoJew\nrUs44LLcZfVjMB+cl2VUV20vAtESxIbhQ3qCovXC2Ku7r3kRAkalZYBN0hZu\nuNYD\r\n=zyOW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGL19NMXlXecjgmfjFMy609x3SFAfIsnVPBWL1T7wEwhAiAh6wSsbJvbMlQA64UAUW2RV/8ab9grCBpX0A4QxVqHjw=="}],"size":31163,"noattachment":false,"key":"/flame-gradient/-/flame-gradient-1.0.0.tgz"},"maintainers":[{"name":"alan.slater","email":"alan.slater@nearform.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flame-gradient_1.0.0_1537892794320_0.9837491756443524"},"_hasShrinkwrap":false,"readme":"# flame-gradient\n\nThis module generates flame gradients like this one:\n\n![banner](5000-slice-sample.png)\n\n...going from dark almost-black red to bright almost-white yellow.\n\n## Usage\n\nGet one rgb value for a specific decimal value:\n\n```js\nconst flameGradient = require('flame-gradient')\n\nconst rgb = flameGradient(0.6) // returns 'rgb(255, 150, 1)'\nconst rgba = flameGradient(0.6, 0.5) // returns 'rgba('255, 150, 1, 0.5)'\n```\n\nGenerate an entire gradient:\n\n```js\nconst generate = require('flame-gradient/generate.js')\n\nconst arrayOf1000Rgbs = generate(1000)\nconsole.log(arrayOf1000Rgbs)\n\ngenerate(1000, (rgb) => {\n  console.log(rgb) // Logs each of 1000 RGB gradient points\n})\n```\n\nView a gradient with a set number of points in a new browser window:\n\n```sh\n# Defaults to 1000 slices\nnpm run view\n\n# Set a number of slices\nnpm run view -- 15\n```\n\n## Accessibility\n\nThese have been tested to have a good balance of vibrant colour and smooth progression in brightness, such that higher values appear brighter to a consistent amount, including in monohrome and across different types of colour vision deficiency (CVD). This is done by incrementing the R, G and B channels in slightly overlapping sine curves, each slightly stretched based on an approximation of that channel's relative luminosity.\n\nAs such they should be usable as colour scales in visualisations.\n\nExamples using [CoBlIs](https://www.color-blindness.com/coblis-color-blindness-simulator/):\n\nMonochrome (Achromatopsia):\n\n![Monochrome](cvd-images/0-Monochrome.png)\n\nProtanomaly (\"red-weak\"):\n\n![Protanomaly](cvd-images/1-Protanomaly.png)\n\nDeuteranomaly (\"green-weak\"):\n\n![Deuteranomaly](cvd-images/2-Deuteranomaly.png)\n\nTritanomaly (\"blue-weak\"):\n\n![Tritanomaly](cvd-images/3-Tritanomaly.png)\n\nProtanopia (\"red-blind\"):\n\n![Protanopia](cvd-images/4-Protanopia.png)\n\nDeuteranopia (\"green-blind\")\n\n![Deuteranopia](cvd-images/5-Deuteranopia.png)\n\nTritanopia (\"blue-blind\")\n\n![Tritanopia](cvd-images/6-Tritanopia.png)\n\nBlue cone monochromacy\n\n![Blue cone monochromacy](cvd-images/7-Blue-cone.png)\n\n## Acknowledgements\n\nSponsored by [nearForm](http://nearform.com)\n\n## License\n\nMIT\n","publish_time":1537892794484,"_cnpm_publish_time":1537892794484,"dist-tags":{"latest":"1.0.0"}}