{"name":"rgb-hex","version":"4.1.0","description":"Convert RGB(A) color to HEX","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/rgb-hex.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava","//test":"xo && ava && tsd"},"keywords":["rgb","hex","color","colour","convert","conversion","converter"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"types":"./index.d.ts","gitHead":"49e46afac871cf2adde9b27bce4a6958deffffbd","bugs":{"url":"https://github.com/sindresorhus/rgb-hex/issues"},"homepage":"https://github.com/sindresorhus/rgb-hex#readme","_id":"rgb-hex@4.1.0","_nodeVersion":"18.16.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-UZLM57BW09Yi9J1R3OP8B1yCbbDK3NT8BDtihGZkGkGEs2b6EaV85rsfJ6yK4F+8UbxFFmfA+9xHT5ZWhN1gDQ==","shasum":"b343f394c8f9df629a7504c34c00b5bc63bd006f","tarball":"http://registry-npm.ywwl.com/rgb-hex/download/rgb-hex-4.1.0.tgz","fileCount":5,"unpackedSize":4816,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCltTzof6AZkQQUtuVW3hjAjz+Bnx0frLvOD9APNjRFtQIhAPCKT6tnbRLk/ZOuEezZUZvF2qVyobgVKzOVoQ5tMYsV"}],"size":2273,"noattachment":false,"key":"/rgb-hex/-/rgb-hex-4.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rgb-hex_4.1.0_1693554375935_0.5374664372926783"},"_hasShrinkwrap":false,"readme":"# rgb-hex\n\n> Convert RGB(A) color to HEX\n\n## Install\n\n```\n$ npm install rgb-hex\n```\n\n## Usage\n\n```js\nimport rgbHex from 'rgb-hex';\n\nrgbHex(65, 131, 196);\n//=> '4183c4'\n\nrgbHex('rgb(40, 42, 54)');\n//=> '282a36'\n\nrgbHex(65, 131, 196, 0.2);\n//=> '4183c433'\n\nrgbHex(40, 42, 54, '75%');\n//=> '282a36bf'\n\nrgbHex('rgba(40, 42, 54, 75%)');\n//=> '282a36bf'\n```\n\n## Related\n\n- [rgb-hex-cli](https://github.com/sindresorhus/rgb-hex-cli) - CLI for this module\n- [hex-rgb](https://github.com/sindresorhus/hex-rgb) - Convert HEX color to RGB\n","publish_time":1693554376100,"_cnpm_publish_time":1693554376100,"dist-tags":{"latest":"4.1.0"}}