{"_id":"@antoineguglielmi/tw-colors","name":"@antoineguglielmi/tw-colors","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@antoineguglielmi/tw-colors","version":"0.0.1","description":"A color manager for TailwindCSS","main":"dist/colors.js","types":"dist/colors.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"keywords":["tailwindcss","typescript","colors"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","devDependencies":{"@types/node":"^22.9.3","autoprefixer":"^10.4.20","postcss":"^8.4.49","tailwindcss":"^3.4.15","typescript":"^5.0.0"},"_id":"@antoineguglielmi/tw-colors@0.0.1","gitHead":"bc22083ecb19fa32b1b9881cde29eeb9345c04a7","_nodeVersion":"20.11.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-LGhB/9Q8Xsr963iIeFI58HUlxGmiMJapZ8Wh0byoEZmLpG6k7bZHFnZY11gw8BCs7ELzvQNLKAHGSQNzhS1vTQ==","shasum":"8d44537df79a2d69a42d4ac3f6f75eb92410f30b","tarball":"https://registry.npmjs.org/@antoineguglielmi/tw-colors/-/tw-colors-0.0.1.tgz","fileCount":4,"unpackedSize":4897,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAoP2/5lALXltvilOoOue3Y8wQ6OfR8qhwyzu8Kq/6OAiB6Au51zz/n/DE4fMIGduNfBDgq++PC6zK/22ib6Xb0ow=="}]},"_npmUser":{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"},"directories":{},"maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tw-colors_0.0.1_1732365882206_0.2217435558601395"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-23T12:44:42.094Z","0.0.1":"2024-11-23T12:44:42.368Z","modified":"2024-11-23T12:44:42.642Z"},"maintainers":[{"name":"antoineguglielmi","email":"contact.antoine.guglielmi@gmail.com"}],"description":"A color manager for TailwindCSS","keywords":["tailwindcss","typescript","colors"],"author":{"name":"Antoine Guglielmi"},"license":"MIT","readme":"# @antoineguglielmi/tw-colors\n\nA color manager for TailwindCSS.\n\n## Installation\n\nInstall the package using npm:\n\n```bash\nnpm install @antoineguglielmi/tw-colors\n```\n\n## Usage\n\nIn your `globals.css` file, declare your color css variables:\n\n```css\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n@layer base {\n  :root {\n    --color-white: #f9f9f9;\n    --color-black: #1a1a1a;\n  }\n}\n```\n\nImport the colors function and use it to get the colors from your `globals.css` file:\n\n```typescript\nimport { colors } from '@antoineguglielmi/tw-colors'\n\nconst colorConfig = colors({\n  variablesPrefix: 'color',\n  globalsCssPath: './src/app/globals.css',\n  primaryColors: { transparent: 'transparent' },\n})\n\nexport default {\n  theme: {\n    extend: {\n      colors: colorConfig,\n    },\n  },\n} satisfies Config\n```\n\n## Options\n\nThe `colors` function accepts an object with the following properties:\n\n- `variablesPrefix (string)`: The prefix of the CSS variables. Default is `'color'`.\n- `globalsCssPath (string)`: The path of the `globals.css` file. Default is `'./src/app/globals.css'`.\n- `primaryColors (Record<string, string>)`: The primary colors. Default is `{ transparent: 'transparent' }`.\n","readmeFilename":"README.md"}