{"name":"@ant-design/colors","version":"7.2.0","author":{"name":"afc163","email":"afc163@gmail.com"},"license":"MIT","_id":"@ant-design/colors@7.2.0","homepage":"https://github.com/ant-design/ant-design-colors#readme","bugs":{"url":"https://github.com/ant-design/ant-design-colors/issues"},"dist":{"shasum":"80d7325d20463f09c7839d28da630043dd5c263a","tarball":"http://registry-npm.ywwl.com/@ant-design/colors/download/@ant-design/colors-7.2.0.tgz","fileCount":27,"integrity":"sha512-bjTObSnZ9C/O8MB/B4OUtd/q9COomuJAR2SYfhxLyHvCKn4EKwCN3e+fWGMo7H5InAyV0wL17jdE9ALrdOW/6A==","signatures":[{"sig":"MEQCIBhQzTpDstwauM8Jf1VillDxv3MWx7EHV/xki+LNjWw1AiARBvwddh+ZNwV+16yn8GXM7PNYZSzNYuELg955btoseg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32705,"size":7816,"noattachment":false,"key":"/@ant-design/colors/-/@ant-design/colors-7.2.0.tgz"},"main":"./lib/index","module":"./es/index","gitHead":"7dcf68845da6851aa7e5e5f26e24fd87469cb853","scripts":{"lint":"eslint src --ext .ts","test":"jest","bench":"vitest bench","compile":"father build","prepare":"tsx generate-presets","coverage":"npm test -- --coverage","prettier":"prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"","prepublishOnly":"npm run compile && np --no-cleanup --no-publish"},"typings":"es/index.d.ts","_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"repository":{"url":"git+https://github.com/ant-design/ant-design-colors.git","type":"git"},"_npmVersion":"10.8.3","description":"Color palettes calculator of Ant Design","directories":{},"_nodeVersion":"22.8.0","dependencies":{"@ant-design/fast-color":"^2.0.6"},"_hasShrinkwrap":false,"devDependencies":{"np":"^7.7.0","tsx":"^4.16.1","jest":"^26.6.3","eslint":"^7.32.0","father":"^4.4.4","vitest":"^1.6.0","ts-jest":"^26.5.6","prettier":"^2.8.8","typescript":"^4.9.5","@types/jest":"^26.0.24","@types/node":"^20.14.9","@umijs/fabric":"^3.0.0","@ctrl/tinycolor":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/colors_7.2.0_1735657409581_0.6200863571233635","host":"s3://npm-registry-packages-npm-production"},"readme":"<h1 align=\"center\">Ant Design Colors</h1>\n\n<div align=\"center\">\n\n:art: Color palettes calculator of [Ant Design](https://ant.design/docs/spec/colors).\n\n[![CI status][github-action-image]][github-action-url]\n[![codecov][codecov-image]][codecov-url]\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][download-image]][download-url]\n[![][bundlephobia-image]][bundlephobia-url]\n\n![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)\n\n[npm-image]: http://img.shields.io/npm/v/@ant-design/colors.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/@ant-design/colors\n[github-action-image]: https://github.com/ant-design/ant-design-colors/actions/workflows/ci.yml/badge.svg\n[github-action-url]: https://github.com/ant-design/ant-design-colors/actions/workflows/ci.yml\n[codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design-colors/main.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/ant-design/ant-design-colors/tree/main\n[download-image]: https://img.shields.io/npm/dm/@ant-design/colors.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@ant-design/colors\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@ant-design/colors?style=flat-square\n[bundlephobia-url]: https://bundlephobia.com/package/@ant-design/colors\n</div>\n\n![](https://user-images.githubusercontent.com/507615/55726820-43e68400-5a43-11e9-8541-b0fc28b78f37.png)\n\n## Install\n\n```bash\n$ npm install @ant-design/colors\n// or\n$ yarn add @ant-design/colors\n```\n\n## Usage\n\n```bash\n$ npm install @ant-design/colors --save\n```\n\n```js\nimport {\n  red,\n  volcano,\n  gold,\n  yellow,\n  lime,\n  green,\n  cyan,\n  blue,\n  geekblue,\n  purple,\n  magenta,\n  grey,\n} from '@ant-design/colors';\n\nconsole.log(blue); // ['#E6F4FF', '#BAE0FF', '#91CAFF', '#69B1FF', '#4096FF', '#1677FF', '#0958D9', '#003EB3', '#002C8C', '#001D66']\nconsole.log(blue.primary); // '#1677FF'\n```\n\n```js\nimport { generate, presetPalettes } from '@ant-design/colors';\n\n// Generate color palettes by a given color\nconst colors = generate('#1890ff');\nconsole.log(colors); // ['#E6F7FF', '#BAE7FF', '#91D5FF', ''#69C0FF', '#40A9FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C', '#002766']\nconsole.log(presetPalettes);\n/*\n{\n  red: [...],\n  volcano: [...],\n  orange: [...],\n  gold: [...],\n  yellow: [...],\n  lime: [...],\n  green: [...],\n  cyan: [...],\n  blue: [...],\n  geekblue: [...],\n  purple: [...],\n  magenta: [...],\n}\n*/\n```\n\n```js\nimport { generate, presetDarkPalettes } from '@ant-design/colors';\n\n// Generate dark color palettes by a given color\nconst colors = generate('#1890ff', {\n  theme: 'dark',\n  backgroundColor: '#141414',\n});\nconsole.log(colors); // ['#111d2c', '#112a45', '#15395b', '#164c7e', '#1765ad', '#177ddc', '#3c9ae8', '#65b7f3', '#8dcff8', '#b7e3fa']\nconsole.log(presetDarkPalettes);\n/*\n{\n  red: [...],\n  volcano: [...],\n  orange: [...],\n  gold: [...],\n  yellow: [...],\n  lime: [...],\n  green: [...],\n  cyan: [...],\n  blue: [...],\n  geekblue: [...],\n  purple: [...],\n  magenta: [...],\n}\n*/\n```\n\n## Articles\n\n- [Ant Design Colors](https://ant.design/docs/spec/colors)\n- [Ant Design 色板生成算法演进之路](https://zhuanlan.zhihu.com/p/32422584)\n","publish_time":1735657409773,"maintainers":[{"name":"afc163","email":"afc163@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},{"name":"arvinxx","email":"arvinx@foxmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"_cnpm_publish_time":1735657409773,"dist-tags":{"latest":"8.0.1","next":"7.1.1-0"}}