{"name":"@rc-component/color-picker","version":"3.1.1","description":"React Color Picker","keywords":["react","react-component","react-mentions","color-picker"],"homepage":"http://github.com/react-component/color-picker","bugs":{"url":"http://github.com/react-component/color-picker/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/color-picker.git"},"license":"MIT","main":"./lib/index","module":"./es/index","scripts":{"compile":"father build && lessc assets/index.less assets/index.css","coverage":"vitest run --coverage","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","docs:preview":"PREVIEW=true dumi build","gh-pages":"npm run docs:build && npm run docs:deploy","lint":"eslint src/ --ext .tsx,.ts","prepare":"husky install","prepublishOnly":"npm run compile && rc-np","postpublish":"npm run gh-pages","start":"dumi dev","test":"vitest run"},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"dependencies":{"@ant-design/fast-color":"^3.0.1","@rc-component/util":"^1.3.0","clsx":"^2.1.1"},"devDependencies":{"@rc-component/father-plugin":"^2.0.4","@rc-component/np":"^1.0.0","@rc-component/trigger":"^1.13.0","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@types/node":"^24.5.2","@types/react":"^18.0.8","@types/react-dom":"^18.0.3","@types/warning":"^3.0.0","@umijs/fabric":"^3.0.0","@vitest/coverage-c8":"^0.31.0","dumi":"^2.0.18","eslint":"^8.54.0","eslint-plugin-jest":"^27.6.0","eslint-plugin-unicorn":"^49.0.0","father":"^4.0.0","gh-pages":"^4.0.0","husky":"^8.0.3","jsdom":"^22.0.0","less":"^4.2.0","lint-staged":"^13.1.0","prettier":"^2.0.5","react":"^18.0.0","react-dom":"^18.0.0","typescript":"^5.1.3","vitest":"^0.31.0"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_id":"@rc-component/color-picker@3.1.1","gitHead":"77e1e7e9e419a9a1d4ae65dd81c1d15a9ca23e0c","types":"./lib/index.d.ts","_nodeVersion":"22.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-OHaCHLHszCegdXmIq2ZRIZBN/EtpT6Wm8SG/gpzLATHbVKc/avvuKi+zlOuk05FTWvgaMmpxAko44uRJ3M+2pg==","shasum":"0a00411457e697cf9320e945762a4b08f71938f9","tarball":"http://registry-npm.ywwl.com/@rc-component/color-picker/download/@rc-component/color-picker-3.1.1.tgz","fileCount":66,"unpackedSize":76396,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG1HtaedTgOp/xk96U5P2hcqU8t+ZKVLQEWYbDgT7zV0AiEAs6pA8L4Jptlc3c9DT/8EiHekcpM2s49rabD+c/pnCts="}],"size":15106,"noattachment":false,"key":"/@rc-component/color-picker/-/@rc-component/color-picker-3.1.1.tgz"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"directories":{},"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/color-picker_3.1.1_1772156786346_0.36853345287355066"},"_hasShrinkwrap":false,"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":1772156786495,"_cnpm_publish_time":1772156786495,"dist-tags":{"latest":"3.1.1"}}