{"_id":"@boenfu/text-rgb","name":"@boenfu/text-rgb","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@boenfu/text-rgb","version":"0.1.0","packageManager":"pnpm@8.14.0","description":"Create rgb tuple from a string of text","author":{"name":"boenfu"},"publishConfig":{"access":"public"},"homepage":"https://github.com/boenfu/text-rgb#readme","repository":{"type":"git","url":"git+https://github.com/boenfu/text-rgb.git"},"bugs":{"url":"https://github.com/boenfu/text-rgb/issues"},"keywords":["text2color","text-rgb","rgb"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"unbuild --stub","lint":"eslint .","prepublishOnly":"nr build","release":"bumpp && npm publish","test":"vitest","typecheck":"tsc --noEmit","prepare":"simple-git-hooks"},"devDependencies":{"@antfu/eslint-config":"^2.6.2","@antfu/ni":"^0.21.12","bumpp":"^9.2.1","eslint":"^8.56.0","lint-staged":"^15.2.0","simple-git-hooks":"^2.9.0","typescript":"^5.3.3","unbuild":"^2.0.0","vitest":"^1.1.3"},"simple-git-hooks":{"pre-commit":"pnpm lint-staged"},"lint-staged":{"*":"eslint --fix"},"gitHead":"a409d15d0ea9ea53b6bbcbdbbbc4a786c50e7a72","_id":"@boenfu/text-rgb@0.1.0","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-M1bfqgKje3AdfYoME5iIlGcXQPkwukPqE6+sLnoH42hnUJR4/SOgaMCst15dV3Rk1712vbcd80mDl76inb51ew==","shasum":"0b3c231f0ad0c77db44fe7758cc7481ee27c4d77","tarball":"https://registry.npmjs.org/@boenfu/text-rgb/-/text-rgb-0.1.0.tgz","fileCount":8,"unpackedSize":10853,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPmSyNe6Ja0upnew/WCRISzrCg020px0oXjDjRanpajAIhAIp4fXLXWdqELr+lTypoV3L0r/g6NxPcuJ8QszY34MA8"}]},"_npmUser":{"name":"boenfu","email":"1997@boenfu.cn"},"directories":{},"maintainers":[{"name":"boenfu","email":"1997@boenfu.cn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-rgb_0.1.0_1710568787338_0.05728482331440454"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-16T05:59:47.231Z","0.1.0":"2024-03-16T05:59:47.522Z","modified":"2024-03-16T05:59:48.085Z"},"maintainers":[{"name":"boenfu","email":"1997@boenfu.cn"}],"description":"Create rgb tuple from a string of text","homepage":"https://github.com/boenfu/text-rgb#readme","keywords":["text2color","text-rgb","rgb"],"repository":{"type":"git","url":"git+https://github.com/boenfu/text-rgb.git"},"author":{"name":"boenfu"},"bugs":{"url":"https://github.com/boenfu/text-rgb/issues"},"readme":"# text-rgb\nCreate rgb tuple from a string of text\n## Install\n```shell\nnpm install @beonfu/text-rgb\n```\n\n## Usage\n\n```javascript\nimport { rgb, rgbString, rgbaString } from '@beonfu/text-rgb'\n\nrgb('Hello World') // [133, 230, 177]\n\nrgbString('Hello World') // \"rgb(133,230,177)\"\n\nrgbaString('Hello World', 1) // \"rgba(133,230,177,1)\"\n```\n\nThe principle is to divide the text into three parts, and then take the remainder of 256 after accumulating the sum of charCode\nSo there is no randomness\n\n```javascript\nrgb('Hello World') === rgb('Hello World') // true\n```\n\n## Hello World RGB\nIn addition to the functions of the function itself, I also want to share some interesting content\n\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(133, 230, 177)\"\n          >\n          </div>\n          <strong>Hello World</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(96, 147, 76)\"\n          >\n          </div>\n          <strong>你好世界</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(254, 133, 237)\"\n          >\n          </div>\n          <strong>हैलो वर्ल्ड</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(35, 67, 65)\"\n          >\n          </div>\n          <strong>Hola Mundo</strong>\n      </td>\n    </tr>\n    <tr>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(248, 248, 19)\"\n          >\n          </div>\n          <strong>Bonjour le monde</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(203, 218, 233)\"\n          >\n          </div>\n          <strong>مرحبا بالعالم</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(19, 139, 47)\"\n          >\n          </div>\n          <strong>ওহে বিশ্ব</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(201, 163, 212)\"\n          >\n          </div>\n          <strong>Привет, мир</strong>\n      </td>\n    </tr>\n    <tr>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(156, 226, 65)\"\n          >\n          </div>\n          <strong>Olá Mundo</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(21, 72, 56)\"\n          >\n          </div>\n          <strong>Halo Dunia</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(209, 151, 57)\"\n          >\n          </div>\n          <strong>ہیلو دنیا</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(21, 82, 69)\"\n          >\n          </div>\n          <strong>Hallo Welt</strong>\n      </td>\n    </tr>\n    <tr>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(230, 59, 98)\"\n          >\n          </div>\n          <strong>こんにちは世界</strong>\n      </td>\n      <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(157, 32, 252)\"\n          >\n          </div>\n          <strong>안녕 세계</strong>\n      </td>\n       <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(172, 133, 143)\"\n          >\n          </div>\n          <strong>สวัสดีชาวโลก</strong>\n      </td>\n       <td align=\"center\">\n          <div\n           style=\"width:48px;height:48px;background: rgb(149, 222, 176)\"\n          >\n          </div>\n          <strong>Saluton mondo</strong>\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n## PackageName\nWhy use `@boenfu/text-rgb` instead of `text-rgb` ?\n> npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/text-rgb - Package name too similar to existing package [textrgb](https://www.npmjs.com/package/textrgb); try renaming your package to '@boenfu/text-rgb' and publishing with 'npm publish --access=public' instead\n\n## License\nMIT\n","readmeFilename":"README.md"}