{"name":"@rc-component/color-picker","version":"3.0.2","keywords":["react","react-component","react-mentions","color-picker"],"license":"MIT","_id":"@rc-component/color-picker@3.0.2","maintainers":[{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"},{"name":"peachscript","email":"scdzwyxst@gmail.com"},{"name":"chenshuai2144","email":"wasd2144@hotmail.com"}],"homepage":"http://github.com/react-component/color-picker","bugs":{"url":"http://github.com/react-component/color-picker/issues"},"dist":{"shasum":"a2c16be738336f397d4456b6730b11af8cef676c","tarball":"http://registry-npm.ywwl.com/@rc-component/color-picker/download/@rc-component/color-picker-3.0.2.tgz","fileCount":66,"integrity":"sha512-mCoBKA4j7BZpQaUqKDAHUf3xlMY8hYiy0v8WxIqrFOS3Oly376Qv6k+3QJC5OH21zv7bHw8IrI5T2HIrFCl8Bw==","signatures":[{"sig":"MEUCIQDrmT/DOui3vK/1pm8bwN6NoS94Ha8ay7HkHpKtlHnbuwIgSPVv/mfgSU8G8I+vvfqmkYzJla9yVzf2UKGGomoQ+Os=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76043,"size":14976,"noattachment":false,"key":"/@rc-component/color-picker/-/@rc-component/color-picker-3.0.2.tgz"},"main":"./lib/index","types":"./lib/index.d.ts","module":"./es/index","gitHead":"a0329976958dcc5e47cc9c270969a279aab9ad86","scripts":{"lint":"eslint src/ --ext .tsx,.ts","test":"vitest run","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install","coverage":"vitest run --coverage","gh-pages":"npm run docs:build && npm run docs:deploy","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","postpublish":"npm run gh-pages","docs:preview":"PREVIEW=true dumi build","prepublishOnly":"npm run compile && rc-np"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/color-picker.git","type":"git"},"_npmVersion":"10.9.2","description":"React Color Picker","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"_nodeVersion":"22.15.1","dependencies":{"classnames":"^2.2.6","@rc-component/util":"^1.3.0","@ant-design/fast-color":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"dumi":"^2.0.18","less":"^4.2.0","husky":"^8.0.3","jsdom":"^22.0.0","react":"^18.0.0","eslint":"^8.54.0","father":"^4.0.0","vitest":"^0.31.0","gh-pages":"^4.0.0","prettier":"^2.0.5","react-dom":"^18.0.0","typescript":"^5.1.3","lint-staged":"^13.1.0","@types/react":"^18.0.8","@umijs/fabric":"^3.0.0","@types/warning":"^3.0.0","@rc-component/np":"^1.0.0","@types/react-dom":"^18.0.3","@types/classnames":"^2.2.6","eslint-plugin-jest":"^27.6.0","@vitest/coverage-c8":"^0.31.0","@rc-component/trigger":"^1.13.0","eslint-plugin-unicorn":"^49.0.0","@testing-library/react":"^13.3.0","@testing-library/jest-dom":"^5.16.4","@rc-component/father-plugin":"^2.0.4"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/color-picker_3.0.2_1758246709243_0.5959083235534404","host":"s3://npm-registry-packages-npm-production"},"readme":"# @rc-component/color-picker\n\nReact Color Picker.\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) \n\n[npm-image]: http://img.shields.io/npm/v/@rc-component/color-picker.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/@rc-component/color-picker\n[github-actions-image]: https://github.com/react-component/color-picker/actions/workflows/main.yml/badge.svg\n[github-actions-url]: https://github.com/react-component/color-picker/actions/workflows/main.yml\n[coveralls-image]: https://img.shields.io/coveralls/react-component/color-picker.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/color-picker?branch=master\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/color-picker/master.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/react-component/color-picker/branch/master\n[david-url]: https://david-dm.org/react-component/color-picker\n[david-image]: https://david-dm.org/react-component/color-picker/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/color-picker?type=dev\n[david-dev-image]: https://david-dm.org/react-component/color-picker/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/@rc-component/color-picker.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@rc-component/color-picker\n[bundlephobia-url]: https://bundlephobia.com/result?p=@rc-component/color-picker\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/color-picker\n\n## install\n\n[![@rc-component/color-picker](https://nodei.co/npm/@rc-component/color-picker.png)](https://npmjs.org/package/@rc-component/color-picker)\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8000\n\n## Usage\n\n```js\nimport ColorPicker from '@rc-component/color-picker';\nimport '@rc-component/color-picker/assets/index.css';\n\nexport default () => <ColorPicker />;\n```\n\n## API\n\n<!-- prettier-ignore -->\n| Property | Description | Type | Default |\n| :-- | :-- | :-- | :-- |\n| value | Value of color | string \\| `Color` | - |\n| defaultValue | Default value of color | string \\| `Color` | - |\n| onChange | Callback when `value` is changed | `(value: Color, type: hue \\| alpha) => void` | - |\n| onChangeComplete | Callback when `drag` is stop | `(value: Color, type: hue \\| alpha) => void` | - |\n| disabled | Disabled ColorPicker | boolean | false |\n| disabledAlpha | Disabled alpha slider | boolean | false |\n| panelRender | Custom panel render | `(panel: React.ReactElement) => React.ReactElement` | - |\n\n### Color\n\n<!-- prettier-ignore -->\n| Property | Description | Type | Default |\n| :-- | :-- | :-- | :-- |\n| toHexString | Convert to `hex` format color string, like `#ffffff` | `() => string` | - |\n| toHsb | Convert to `hsb` object, like `{ h: 0, s: 0, b: 0, a: 0 }`  | `() => ({ h: number, s: number, b: number, a number })` | - |\n| toHsbString | Convert to `hsb` format color string, like `hsba(0, 0%, 0%, 0)` | `() => string` | - |\n| toRgb | Convert to `rgb` object,  like `{ r: 0, g: 0, b: 0, a: 0 }` | `() => ({ r: number, g: number, b: number, a number })` | - |\n| toRgbString | Convert to `rgb` format color string, like `rgba(0, 0, 0, 0)` | `() => string` | - |\n\n## Test Case\n\n```\nnpm test\nor\nnpm run coverage\n```\n\n## License\n\n@rc-component/color-picker is released under the MIT license.\n","publish_time":1758246709434,"_cnpm_publish_time":1758246709434,"dist-tags":{"latest":"3.1.1"}}