{"_id":"@calvin-coomer/avatar-color-picker","_rev":"6-a88b3bb7858506e332be787fe4a9af0b","name":"@calvin-coomer/avatar-color-picker","description":"Generate avatar material colors from a string","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.0","author":{"name":"Calvin Coomer"},"license":"ISC","_id":"@calvin-coomer/avatar-color-picker@1.0.0","dist":{"shasum":"25a048a89f18216321c7b7db737de24013554ce4","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.0.tgz","fileCount":10,"integrity":"sha512-rc16iEJuOSMHPEaFUsoTZJ62wOLbx7rukPw+6lo47ZzZNcJ2fbngSgRhu9SQLWCSskZFcqsmtIr54kzhD9+bhg==","signatures":[{"sig":"MEUCICeUIvkKIExbKCDbqXVZyuzEUqjJMfx7FjqCvhYjjhonAiEAsT+QglZ3F74tM9yM2CeSCbx3+SjLrt6PCjqJdgTemJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104605},"main":"index.js","scripts":{"build":"tsc"},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"_npmVersion":"10.2.3","description":"Generate avatar material colors from a string","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/avatar-color-picker_1.0.0_1719837227862_0.9254647926537816","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.1","author":{"name":"Calvin Coomer"},"license":"ISC","_id":"@calvin-coomer/avatar-color-picker@1.0.1","dist":{"shasum":"d3a758eb726b3f963758a074195aa2db7d1c6e99","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.1.tgz","fileCount":12,"integrity":"sha512-ULJimyVygyF0NK+JtPqemUVwLCmvJDKQTLRKh2mFFkp8ZNIH1cYZ9edWmQSkPNi4XFVky4j3K3MTf7+wMM1P8w==","signatures":[{"sig":"MEYCIQDw8V9y/8y2J7kzqF+3/qpWcJAgAyaEvkTszBdXemT50QIhAOHeIdn8jJCoBKMieOsS3Ty4adm5Zc1KkgD1KHy6JAbL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105931},"main":"index.js","gitHead":"4ab66f67bd3f29d5c6a64549d24b0d66f63841ba","scripts":{"build":"tsc"},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"_npmVersion":"10.2.3","description":"Generate avatar material colors from a string","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/avatar-color-picker_1.0.1_1719837900048_0.7333098644378684","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.2","author":{"name":"Calvin Coomer"},"license":"ISC","_id":"@calvin-coomer/avatar-color-picker@1.0.2","dist":{"shasum":"a2c8636db1888176ffae792ecbb0a40d8c658d80","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.2.tgz","fileCount":12,"integrity":"sha512-V5i3MJl1BbVWrusdQo8eDdIuucw1heEJqqrSB0J81EDcJxSSm6V9JEeiU1qWgjDiAtC3Oi4BjkCYx74ACVeCnQ==","signatures":[{"sig":"MEUCIQDVSjUaojJTMj7mYV8WXs0m48cp+DsR9oZ6DWNXOHlzjgIgfGdRfjYueYow2ZNBWMEhL1nQpRynRYytvqvbrdSgMHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105936},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"27d0e2c94c10744d877b061e60a9bbce9c28201d","scripts":{"build":"tsc"},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"_npmVersion":"10.2.3","description":"Generate avatar material colors from a string","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/avatar-color-picker_1.0.2_1719838178394_0.28622490259986777","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.3","author":{"name":"Calvin Coomer"},"license":"ISC","_id":"@calvin-coomer/avatar-color-picker@1.0.3","dist":{"shasum":"6c2472748fc52ab3789f2c9c444b90a6dd41beda","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.3.tgz","fileCount":12,"integrity":"sha512-GguCNfnhI1S3otBCfzL2ZQASckY6isPUjB1vRx1NpI1FG8SbZQzAXpFnzabFDFA/eH3Ch73bCKpcur76yaovwQ==","signatures":[{"sig":"MEUCIBNPvoNnp5mQeXO3mnP+0qtVVGdiPkZ1Dhjbo4ZlbTb3AiEAxSmIgbFePejLQWT/iOdCdArmN7b+jy4c2PgbXlG1rnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":105966},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"27d0e2c94c10744d877b061e60a9bbce9c28201d","scripts":{"build":"tsc"},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"_npmVersion":"10.2.3","description":"Generate avatar material colors from a string","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/avatar-color-picker_1.0.3_1719838380156_0.027346151252914286","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.4","author":{"name":"Calvin Coomer"},"license":"ISC","_id":"@calvin-coomer/avatar-color-picker@1.0.4","dist":{"shasum":"ff87ff035b1ce30ab283d379b7d8ac593244bf0e","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.4.tgz","fileCount":12,"integrity":"sha512-y3w+MpeQdSGClqXYmXWEzaM7TCImCaq/QkojO8mR3yJzHqmC3eAM9Df0DQbS+KJnyI4uBD4Wdxr3x8s3qkxGmQ==","signatures":[{"sig":"MEQCIC2KDHKZ6r0mtwqADyGdbEOv7PPk2ybr61lFsd5aLXwTAiBoMjKXKpIVTs1hD+yW6QSRBI2xje3+LEk3rT3+E29tvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106758},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"27d0e2c94c10744d877b061e60a9bbce9c28201d","scripts":{"build":"tsc"},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"_npmVersion":"10.2.3","description":"Generate avatar material colors from a string","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/avatar-color-picker_1.0.4_1719839157136_0.48639188732672145","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.5","author":{"name":"Calvin Coomer"},"license":"ISC","_id":"@calvin-coomer/avatar-color-picker@1.0.5","homepage":"https://github.com/Calvin-Coomer/AvatarColorPicker#readme","bugs":{"url":"https://github.com/Calvin-Coomer/AvatarColorPicker/issues"},"dist":{"shasum":"1d5ffcef21f2d3bbf682688e7360b95a344d2d92","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.5.tgz","fileCount":12,"integrity":"sha512-iXBCggPP5EORORZ5cpnUSHDvhyaTJnAXVILtYdFAIzGqhWDa8ntZr1VmJk8x48lRe2wC94NiWbUGgp01TWuWGQ==","signatures":[{"sig":"MEYCIQDai1q0l+A/vn5Y/QZrZ24+jvBrYQM4TsIEWS2fn0L4swIhANNNgtKXqqGY/I/SfLUcGSqW35tdzpzDFWamI/NA1K8+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107295},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"27d0e2c94c10744d877b061e60a9bbce9c28201d","scripts":{"build":"tsc"},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"repository":{"url":"git+https://github.com/Calvin-Coomer/AvatarColorPicker.git","type":"git"},"_npmVersion":"10.2.3","description":"Generate avatar material colors from a string","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/avatar-color-picker_1.0.5_1719909761462_0.764884032264967","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@calvin-coomer/avatar-color-picker","version":"1.0.6","description":"Generate avatar material colors from a string","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/Calvin-Coomer/AvatarColorPicker.git"},"author":{"name":"Calvin Coomer"},"license":"ISC","devDependencies":{"typescript":"^5.5.2"},"_id":"@calvin-coomer/avatar-color-picker@1.0.6","gitHead":"27d0e2c94c10744d877b061e60a9bbce9c28201d","bugs":{"url":"https://github.com/Calvin-Coomer/AvatarColorPicker/issues"},"homepage":"https://github.com/Calvin-Coomer/AvatarColorPicker#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-NfeezYjn6KStrwvPVad+wk6qLAr7zF2HkFbSLVYhvxnKH2Al/DLpaY3CAdMNGY+oqsQUXsBpqYh7829a59Nltw==","shasum":"0a37301386ac262eaf5481adde10cb406b4d0569","tarball":"https://registry.npmjs.org/@calvin-coomer/avatar-color-picker/-/avatar-color-picker-1.0.6.tgz","fileCount":12,"unpackedSize":107295,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCol892BCAhPxvxGsiQoSDDPOVElH9cFN4belBty1F4hAIgIsk1wV4Gsfkc0YBWpfB7g0VbouX/igOChYy+EyghVTI="}]},"_npmUser":{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/avatar-color-picker_1.0.6_1719910545190_0.7486102965497747"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-01T12:33:47.717Z","modified":"2024-07-02T08:55:45.538Z","1.0.0":"2024-07-01T12:33:48.016Z","1.0.1":"2024-07-01T12:45:00.237Z","1.0.2":"2024-07-01T12:49:38.552Z","1.0.3":"2024-07-01T12:53:00.337Z","1.0.4":"2024-07-01T13:05:57.337Z","1.0.5":"2024-07-02T08:42:41.676Z","1.0.6":"2024-07-02T08:55:45.366Z"},"maintainers":[{"name":"calvin-coomer","email":"calvin@tasklogix.co.za"}],"author":{"name":"Calvin Coomer"},"repository":{"type":"git","url":"git+https://github.com/Calvin-Coomer/AvatarColorPicker.git"},"license":"ISC","homepage":"https://github.com/Calvin-Coomer/AvatarColorPicker#readme","bugs":{"url":"https://github.com/Calvin-Coomer/AvatarColorPicker/issues"},"readme":"\n# Color Picker\n\nThis TypeScript module provides functions to get a color based on a string input and predefined options. It includes functionality to restrict colors to certain shades, exclude certain categories, and supports methods for retrieving RGB, Hex, and font colors.\n\n## Features\n\n- **Get color based on string input**: Converts a string to a color by hashing the string and selecting a color from a predefined list.\n- **Customizable options**: Allows for customizing the available shades, excluded categories, and theme.\n- **RGB and Hex methods**: Provides methods to retrieve the RGB and Hex values of the selected color.\n- **Font color determination**: Provides a method to determine the appropriate font color based on the selected color's brightness.\n\n## Installation\n\nTo use this module, you need to include it in your TypeScript project. You can install it via npm or yarn:\n\n```bash\nnpm install @calvin-coomer/avatar-color-picker\n```\n\nor\n\n```bash\nyarn add @calvin-coomer/avatar-color-picker\n```\n\n## Usage\n\nHere's how you can use the `getColor` function and its associated methods:\n\n### Importing the Module\n\n```typescript\nimport { getColor, Category, Shade, Options } from '@calvin-coomer/avatar-color-picker';\n```\n\n### Getting a Color\n\n```typescript\nconst color = getColor('calvin coomer');\nconsole.log(color);\n```\n\n### Getting RGB Value\n\n```typescript\nconst rgb = getColor.rgb('calvin coomer');\nconsole.log(rgb);\n```\n\n### Getting Hex Value\n\n```typescript\nconst hex = getColor.hex('calvin coomer');\nconsole.log(hex);\n```\n\n### Getting Font Color\n\n```typescript\nconst fontColor = getColor.fontColor('calvin coomer');\nconsole.log(fontColor);\n```\n\n### Customizing Options\n\nYou can customize the options for `getColor` by providing an `Options` object:\n\n```typescript\nconst options: Options = {\n  shades: [Shade.Shade300, Shade.Shade400, Shade.Shade500],\n  excludeCategories: [Category.red, Category.pink],\n  darkTheme: true,\n  lightFontColor: '#FFFFFF',\n  darkFontColor: '#000000',\n};\n\nconst customColor = getColor('calvin coomer', options);\nconsole.log(customColor);\n```\n\n## API\n\n### Enums\n\n- **Category**: Defines the available color categories.\n- **Shade**: Defines the available color shades.\n\n### Interfaces\n\n- **Color**: Represents a color object.\n  - `category: Category`\n  - `shade: Shade`\n  - `rgb: string`\n  - `hex: string`\n  - `font: boolean`\n\n- **Options**: Represents the options for color selection.\n  - `excludeCategories: Category[]`\n  - `shades: Shade[]`\n  - `darkTheme: boolean`\n  - `lightFontColor: string`\n  - `darkFontColor: string`\n\n### Functions\n\n- **getColor(str: string, options?: Options): Color**\n  - Returns a color object based on the string input and options.\n\n- **getColor.rgb(str: string, options?: Options): string**\n  - Returns the RGB value of the color.\n\n- **getColor.hex(str: string, options?: Options): string**\n  - Returns the Hex value of the color.\n\n- **getColor.fontColor(str: string, options?: Options): string**\n  - Returns the appropriate font color based on the color's brightness and the provided options.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n","readmeFilename":"README.md"}