{"name":"vanilla-picker","version":"2.12.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","exports":{".":{"require":"./dist/vanilla-picker.js","import":"./dist/vanilla-picker.mjs","default":"./dist/vanilla-picker.mjs"},"./csp":{"require":"./dist/vanilla-picker.csp.js","import":"./dist/vanilla-picker.csp.mjs","default":"./dist/vanilla-picker.csp.mjs"},"./dist/":"./dist/","./dist/*":"./dist/*"},"scripts":{"prepublishOnly":"bash ./scripts/prepub.sh","postpublish":"bash ./scripts/postpub.sh","test":"echo \"Error: no test specified\" && exit 1"},"devDependencies":{"autoprefixer":"^9.6.0","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.2","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.2","postcss-cli":"^6.1.2","pug":"^3.0.2","rollup":"^2.58.0","rollup-plugin-babel":"^3.0.7","rollup-plugin-cleanup":"^3.1.1","rollup-plugin-node-resolve":"^3.4.0","rollup-plugin-replace":"^2.2.0","sass":"^1.43.3"},"dependencies":{"@sphinxxxx/color-conversion":"^2.2.2"},"browserslist":">.1%, last 2 versions, Firefox ESR, not dead","typings":"src/index.d.ts","gitHead":"4f4331e798726a3658799c7d70373f3222b7d28c","_id":"vanilla-picker@2.12.1","_nodeVersion":"16.10.0","_npmVersion":"7.24.0","dist":{"integrity":"sha512-2qrEP9VYylKXbyzXKsbu2dferBTvqnlsr29XjHwFE+/MEp0VNj6oEUESLDtKZ7DWzGdSv1x/+ujqFZF+KsO3cg==","shasum":"6e619eecf553891b8d2d042b745a23c91f19f34c","tarball":"http://registry-npm.ywwl.com/vanilla-picker/download/vanilla-picker-2.12.1.tgz","fileCount":20,"unpackedSize":219450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2/idCRA9TVsSAnZWagAAq0EP/24Ahusevn5j9sr630VU\nAJUXHBnNoQy76yPcfgaa/38iKCKZM6jO0lXUPpigl0tQ8P9K5Ui3rFqg2LR7\nwdvezqx4t04W4+uOSGx/EqLeni7vQ4Iw9IDh54fpe5CyPJqMeiD1N5o8dcQo\nfAYZ9IHO6IcnRIyCRFJwW0+cpIBb+FFZRe3jSwHZnlK7WaAHHrsTk4vwiPqP\nH0Q+brY9Aoq5RNsCitae/4yAazcU+PnCCuBovKJAyuvZSaHdwxU2zuBJCuTU\nn555yMqU2VQzP2c6zzlqB8qZ2bndWZj0U4IltSKC36mrgkvS++unDeTcyem9\nTrbGJXK/rKZv3OYkjhhOwJc/UmBdZKpFnRCCetH+XPFAoXOOCRJZewKQ6vXI\nkqv3WPOIGfctK2TizoKOcgCNF6ZPUr276rZJIyoandqjHvOZRH7ihGXkNL+H\nA11dLHn3SvQ131/aFzY199c18jxD9xaISBmgnjiSewhaCPvTw1xvc+TXHhQ/\nKpwuxxjqGBWLgDlWDZ+SqWqX5W5igWyin3bLIOyU5g+JiqO2D1VLriw3Gkep\nxi7e5Fcsq3hiyzNRfajzwGjzHN0xNfv8MMXbFcsldydZvqEUGJgBkSqzv/J0\nexr24ohMK+fx2wGVBzYq6FHW4RvfHxW/xvNm23iApSCwaXHO/taEHJz8A488\nOh5D\r\n=LQRK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJkeeSAVwjAkbiw85QuAxAz2n5ayDhQ2Y5jbLtvAV5cQIgRwHtJPF5j8rcvEwTukbrH8S7fo4lWoqLyw+l+cz5/SA="}],"size":48540,"noattachment":false,"key":"/vanilla-picker/-/vanilla-picker-2.12.1.tgz"},"_npmUser":{"name":"sphinxxxx","email":"coding@enthuses.me"},"directories":{},"maintainers":[{"name":"sphinxxxx","email":"coding@enthuses.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vanilla-picker_2.12.1_1635441891762_0.40792952346120037"},"_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":1635441891961,"_cnpm_publish_time":1635441891961,"dist-tags":{"latest":"2.12.3"}}