{"name":"vanilla-picker","version":"2.8.1","description":"A simple, easy to use vanilla JS color picker with alpha selection.","keywords":["ux","ui","color","colour","picker","vanilla","vanilla-js","color picker","color-picker","colorpicker","rgb","rgba","hsl","hsla","hex","alpha"],"author":{"name":"Andreas Borgen","url":"https://github.com/Sphinxxxx"},"homepage":"https://vanilla-picker.js.org","license":"ISC","repository":{"type":"git","url":"git+https://github.com/Sphinxxxx/vanilla-picker.git"},"bugs":{"url":"https://github.com/Sphinxxxx/vanilla-picker/issues"},"main":"dist/vanilla-picker.js","unpkg":"dist/vanilla-picker.min.js","module":"dist/vanilla-picker.mjs","scripts":{"prepublish":"bash ./scripts/prepub.sh","postpublish":"bash ./scripts/postpub.sh","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"autoprefixer":"^9.4.4","babel-core":"^6.26.3","babel-plugin-external-helpers":"^6.22.0","babel-preset-env":"^1.7.0","babel-register":"^6.26.0","gulp":"^4.0.0","gulp-file":"^0.4.0","gulp-header":"^2.0.7","gulp-jsdoc3":"^2.0.0","gulp-rename":"^1.4.0","gulp-replace":"^1.0.0","gulp-strip-comments":"^2.5.2","gulp-uglify":"^3.0.1","node-sass":"^4.11.0","postcss-cli":"^6.1.1","pug":"^2.0.3","rollup":"^0.67.4","rollup-plugin-babel":"^3.0.7","rollup-plugin-node-resolve":"^3.4.0"},"dependencies":{"@sphinxxxx/color-conversion":"^2.2.1","drag-tracker":"^1.0.0"},"browserslist":"last 2 versions","gitHead":"03d6bd044e6d8edcc86fdda9bbd19d1bccf4e950","_id":"vanilla-picker@2.8.1","_npmVersion":"6.0.1","_nodeVersion":"6.11.3","_npmUser":{"name":"sphinxxxx","email":"coding@enthuses.me"},"dist":{"integrity":"sha512-mzjMw0WbeS6qi+wzXSCfHFL7Jmvp7sJfXq0FfOvUEAAnCI6cmgCUVJ+wpr2c3g+Gt9AypLpHks3oeIkX6nCM9A==","shasum":"6e643a0356987dca535a2becc970a052e869119e","tarball":"http://registry-npm.ywwl.com/vanilla-picker/download/vanilla-picker-2.8.1.tgz","fileCount":14,"unpackedSize":134302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/XtbCRA9TVsSAnZWagAApFwQAJtV7o89fljSmPrtyixU\n38Ur60z1GYgwfzIKrACzADgpuki3lQ04a+goz1VDiegpc4q0oaUxqXZ/p29y\n/5gDaqUtQS/6yDHyToo8qlUGISczzG151ooKShdsS0IF+Q9dsbp3lXmMAwMB\n3ebkoRUrp0Ap47hi40nMTDOvnfBAE7A7y2Jhr2pHtcZR30Zrj9+SKQTkoav8\n/L6CMiv7POSF0qVEb+ulutgGtjKuwHKCWdCMh0xpeKC1BdhACjfl3L+ahURZ\n3g2SwPHuduKSOL+2eG7EnaudBOYRtqNS0ehlS5R+OCBzOrqKLI0OcU8i173r\nY3RqF166WfCR4j95R093Wp+e9RV8mXhDcIa4Cc5/VsXYLFJkFgSLCOPvTSQi\nrqeUfyxTO8D8NCCxE7uniV0SJmBBbsRpnJDhLE8VNHunfofmM+/puVyeN82X\npGyzhOxsPckEgSnPucJh2AzwPn1f2toK3onSEm228TynjXiNZ+OCqPBYUbep\naYyluFXNpTmOZCXhoP/cNe8+l4Pu2RvpFtPvXlKsCvc3Ht957YAelJI+6wMh\ncltxIMxiv8Xx1pFOxgCTGSKDH0XcLjzunxQj7TEviAIdLtdrKuTYZdydfHTl\n0g4b2sPDnKQFDdIG7HmFrkeRGLRAm9R5vC3mU2S5a7ugL8Xxdsa9EbxPhW7b\nrhG2\r\n=9+lX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvzO90+PQ+2jnXjoAfCPLCmjeD0y1OSuQFylUkv8VM8AIhAOZLrXxBrt/934oFH8O2yOCXi0RLLyd+wyeaeFbsd76A"}],"size":35344,"noattachment":false,"key":"/vanilla-picker/-/vanilla-picker-2.8.1.tgz"},"maintainers":[{"name":"sphinxxxx","email":"coding@enthuses.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vanilla-picker_2.8.1_1560116059201_0.7940926748111448"},"_hasShrinkwrap":false,"readme":"# vanilla-picker\n\n[![License](https://img.shields.io/npm/l/vanilla-picker.svg)](https://github.com/Sphinxxxx/vanilla-picker/blob/master/LICENSE.md)\n[![Version](https://img.shields.io/npm/v/vanilla-picker.svg)](https://npmjs.com/vanilla-picker)\n[![Size](https://badgen.net/badgesize/gzip/sphinxxxx/vanilla-picker/master/dist/vanilla-picker.min.js?label=min%2Bgzip)](https://unpkg.com/vanilla-picker)\n[![Downloads](https://img.shields.io/npm/dm/vanilla-picker.svg)](https://npmjs.com/vanilla-picker)\n\nA simple, easy to use vanilla JS (no dependencies) color picker with alpha selection.\n\n#### Demo\n\nhttps://codepen.io/Sphinxxxx/pen/zRmKBX\n\n\n## Getting Started\n\n#### Installing\n\n* For the pros:\n\n  + ```npm install vanilla-picker --save```\n  + ```import Picker from 'vanilla-picker';```\n\n* For the rest of us:\n\n```\n<script src=\"https://unpkg.com/vanilla-picker@2\"></script>\n```\n\n> **_Note:_**\n> \n> The script adds a `<style>` element to the page, with all the needed CSS. If your site's [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) doesn't allow that, use the CSP build with a separate CSS file instead:\n> ```\n> import Picker from 'vanilla-picker/csp';\n> import 'vanilla-picker/dist/vanilla-picker.csp.css';\n> ```\n> ..or\n> ```\n> <script src=\"vanilla-picker.csp.min.js\"></script>\n> <link  href=\"vanilla-picker.csp.css\" rel=\"stylesheet\">\n> ```\n\n#### Usage\n\n```html\n<div id=\"parent\">Click me</div>\n\n<script>\n\n    /*\n        Create a new Picker instance and set the parent element.\n        By default, the color picker is a popup which appears when you click the parent.\n    */\n    var parent = document.querySelector('#parent');\n    var picker = new Picker(parent);\n\n    /*\n        You can do what you want with the chosen color using two callbacks: onChange and onDone.\n    */\n    picker.onChange = function(color) {\n        parent.style.background = color.rgbaString;\n    };\n\n    /* onDone is similar to onChange, but only called when you click 'Ok' */\n\n</script>\n```\n\n\n## API and advanced options\n\nhttps://vanilla-picker.js.org/gen/Picker.html\n\n\n## Accessibility\n\nThe color picker is built to support basic keyboard navigation and use with screen readers.\nI would be very interested in feedback on improvements that could be done here!\n\n\n## Credits\n\n* Based on https://github.com/dissimulate/Picker by **Adam Brooks**\n* Built with https://github.com/Joudee/color-conversion by **Joudee**\n* Built with https://gist.github.com/mjackson/5311256 by **Michael Jackson**\n\n\n## License\n\nThe ISC license - see the [LICENSE.md](LICENSE.md) file for details.\n","publish_time":1560116059432,"_cnpm_publish_time":1560116059432,"dist-tags":{"latest":"2.12.3"}}