{"_id":"@cacao-research/colors","_rev":"3-83ef2033226c1bbffd5750ef8e352571","name":"@cacao-research/colors","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@cacao-research/colors","version":"0.1.0","keywords":["colors","palette","cacao","design-system","ui"],"author":{"name":"Juan"},"license":"MIT","_id":"@cacao-research/colors@0.1.0","maintainers":[{"name":"jhd3197","email":"jhd3197@gmail.com"}],"dist":{"shasum":"9193010b9084586d62d7d41aa026aa0c958fa02e","tarball":"https://registry.npmjs.org/@cacao-research/colors/-/colors-0.1.0.tgz","fileCount":8,"integrity":"sha512-XScyt0EvwTpwvHmr/MhVZZJjw7sB3qC5E8TbDmFYWjUj0ue+vgtt5oJrZNZ4pGSdUxBlYqnF+aeqFbME11YhgA==","signatures":[{"sig":"MEUCIBrjt0+nvgE1Sv+09JCFplufg4gMz6vo/YiHfn1dDxBgAiEA1mq9Ri4fWVvf29O7WM3OPtiWe9rTH8BBzZp8rCia39Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11482},"main":"src/index.js","type":"module","engines":{"node":">=16"},"exports":"./src/index.js","gitHead":"8838a142317ff97c6eaef9c123ed8082d3a4af11","scripts":{"test":"node tests/smoke.test.js"},"_npmUser":{"name":"jhd3197","email":"jhd3197@gmail.com"},"_npmVersion":"11.2.0","description":"Cacao-inspired color palettes and utilities for design systems.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/colors_0.1.0_1762391903597_0.9056644227352564","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@cacao-research/colors","version":"0.1.1","keywords":["colors","palette","cacao","design-system","ui"],"author":{"name":"Juan"},"license":"MIT","_id":"@cacao-research/colors@0.1.1","maintainers":[{"name":"jhd3197","email":"jhd3197@gmail.com"}],"dist":{"shasum":"4ee9b4ea2ab37811a112babaa21772785cfe88cb","tarball":"https://registry.npmjs.org/@cacao-research/colors/-/colors-0.1.1.tgz","fileCount":8,"integrity":"sha512-tNY6/rca9uz0ayFc5zOJGDOfaW4wtdJ02PEV2712i21fWSndNFS+BrtD1iLugVENYEievJbdtL7OlSuy1XFg3A==","signatures":[{"sig":"MEYCIQCY4AX2YYiJMAbNiev2fj1i1NMuZexC0LhLCkfzObVYBwIhAIcJEdSDPexlVsvmKbwQXfGvwCeCVxttEMAG+PxmheYw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11536},"main":"src/index.js","type":"module","engines":{"node":">=16"},"exports":"./src/index.js","gitHead":"8838a142317ff97c6eaef9c123ed8082d3a4af11","scripts":{"test":"node tests/smoke.test.js"},"_npmUser":{"name":"jhd3197","email":"jhd3197@gmail.com"},"_npmVersion":"11.2.0","description":"Cacao-inspired color palettes and utilities for design systems.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/colors_0.1.1_1762391995611_0.1150377864554617","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@cacao-research/colors","version":"0.1.2","description":"Cacao-inspired color palettes and utilities for design systems.","type":"module","main":"src/index.js","exports":"./src/index.js","sideEffects":false,"scripts":{"test":"node tests/smoke.test.js"},"keywords":["colors","palette","cacao","design-system","ui"],"author":{"name":"Juan"},"license":"MIT","engines":{"node":">=16"},"_id":"@cacao-research/colors@0.1.2","gitHead":"8838a142317ff97c6eaef9c123ed8082d3a4af11","_nodeVersion":"22.14.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-KejHqXZQQYOxqHS4He9/fwS9QL5NkLk9PnCD569/yUyxZgV2jmJ9u6sx6OoOiAujqRT4QP4Jo83SN9+D4ahPIA==","shasum":"7795d6990955bbac181fda997825119f2d80f8ef","tarball":"https://registry.npmjs.org/@cacao-research/colors/-/colors-0.1.2.tgz","fileCount":8,"unpackedSize":11509,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDqzQXB2t9+gh8sdqrc9hxfPPveFKJYpNOcdwe0ySzYBAiBJsMH/M6qinFdyk1aDtzAzSuYN/eHLXLToc1Z7qcEu7g=="}]},"_npmUser":{"name":"jhd3197","email":"jhd3197@gmail.com"},"directories":{},"maintainers":[{"name":"jhd3197","email":"jhd3197@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/colors_0.1.2_1762392042458_0.7407864571521172"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-06T01:18:23.524Z","modified":"2025-11-06T01:20:42.872Z","0.1.0":"2025-11-06T01:18:23.780Z","0.1.1":"2025-11-06T01:19:55.809Z","0.1.2":"2025-11-06T01:20:42.659Z"},"author":{"name":"Juan"},"license":"MIT","keywords":["colors","palette","cacao","design-system","ui"],"description":"Cacao-inspired color palettes and utilities for design systems.","maintainers":[{"name":"jhd3197","email":"jhd3197@gmail.com"}],"readme":"Rich cacao-inspired color palettes for design systems. This package ships ready-made palettes, dark variants, and a generator for creating your own shades.\n\n## Install\n\n```bash\nnpm install @cacao-research/colors\n# or\nyarn add @cacao-research/colors\n# or\npnpm add @cacao-research/colors\n```\n\n## Usage\n\n```js\nimport {\n  cacao,\n  caramel,\n  red,\n  green,\n  presetPalettes,\n  presetDarkPalettes,\n  generate,\n} from '@cacao-research/colors';\n\nconsole.log(cacao);\n// -> array of 10 progressively darker shades\nconsole.log(cacao.primary); // '#7B3F00'\nconsole.log(red.primary); // '#F15644'\nconsole.log(green['green-1']); // first green shade\nconsole.log(presetPalettes['green-1']); // same value, exposed at root level\n\nconst twilight = generate('#7a5a3a');\nconsole.log(twilight.primary); // '#7A5A3A'\n\nconst twilightDark = generate('#7a5a3a', {\n  theme: 'dark',\n  backgroundColor: '#101012',\n});\nconsole.log(twilightDark);\n```\n\n## Preset palettes\n\nNamed palettes are exposed both as individual exports and through `presetPalettes`/`presetDarkPalettes`.\n\n```js\nimport { mocha, presetPalettes } from '@cacao-research/colors';\n\nmocha.primary; // '#6F4E37'\npresetPalettes.mocha === mocha; // true\npresetDarkPalettes.mocha; // dark-friendly variant blended for low-light UIs\n```\n\nAvailable names:\n\n`red`, `volcano`, `orange`, `gold`, `yellow`, `lime`, `green`, `cyan`, `blue`, `geekblue`, `purple`, `magenta`, `grey`, `cacao`, `cocoa`, `espresso`, `mocha`, `caramel`, `dulce`, `vanilla`, `hazelnut`, `almond`, `cinnamon`, `macchiato`, `darkchocolate`.\n\nEvery palette also exposes numbered aliases:\n\n- `presetPalettes['green-1']` through `presetPalettes['green-10']`\n- `green['green-1']` through `green['green-10']`\n\n## Palette generator\n\n```ts\ngenerate(color: string, options?: {\n  theme?: 'default' | 'dark';\n  backgroundColor?: string;\n}): string[] & { primary: string }\n```\n\n- `color` — Any 3 or 6-digit hex string. Shorthand like `#abc` is accepted.\n- `theme` — Set to `'dark'` to blend the palette against a dark background (`'#141414'` by default).\n- `backgroundColor` — Override the background color used for dark palettes.\n\nEach returned palette contains exactly 10 shades and a `primary` property that matches the 6th entry (index `5`), mirroring the API of `@ant-design/colors`.\n\n## Test\n\n```bash\nnpm test\n```\n\nRuns a basic smoke check to ensure palette generation and presets stay aligned.\n\n## License\n\nMIT © Juan\n","readmeFilename":"README.md"}