{"name":"@antv/color-util","version":"2.0.3","description":"A common util collection for antv projects","main":"lib/index.js","types":"lib/index.d.ts","module":"esm/index.js","scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","clean":"rm -rf lib && rm -rf esm","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts __tests__/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts __tests__/mocha.opts","test-live":"torch --compile --interactive --opts __tests__/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit","prepublishOnly":"npm-run-all --parallel test build"},"repository":{"type":"git","url":"git+https://github.com/antvis/util.git"},"keywords":["util","antv","g"],"author":{"name":"https://github.com/orgs/antvis/people"},"license":"ISC","bugs":{"url":"https://github.com/antvis/util/issues"},"devDependencies":{"@antv/torch":"^1.0.0","less":"^3.9.0","npm-run-all":"^4.1.5"},"homepage":"https://github.com/antvis/util#readme","dependencies":{"@antv/util":"~2.0.0","tslib":"^1.10.0"},"_id":"@antv/color-util@2.0.3","_nodeVersion":"11.12.0","_npmVersion":"6.13.2","dist":{"integrity":"sha512-ZwmkqoSBmKTtI6r9+AE7WFHFHvkwUbPULNP7V9Y1UbbMsrTDCS6fxhwLmnXGJpxBjlnqRgmqHXtPiQ84JAYmUg==","shasum":"dc5b59922799a5f56cc27597ca615c212f816baa","tarball":"http://registry-npm.ywwl.com/@antv/color-util/download/@antv/color-util-2.0.3.tgz","fileCount":8,"unpackedSize":20677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS7aICRA9TVsSAnZWagAAg0YP/iBlgYfU93OYmfxQGQuP\nFNnxatZYm+WYxCDwI007hN25OZEMuBw+eZNupXRuDTm7MxxFPhNa0l0V8YHT\n7oFQTJr7rX4mzIHZKE2YlUEhI9VtT7jUjOdjjsp7iww8vjRSS6CpVmjjsgFt\n2LWT7wtndvXkC6ufGFHj3oEIcwMAQHs5rzJ7BLzwE+3yrLSU0DcZTo8JBLCK\nt1MHjLxnG09ZWbz4eqH1nk5fqAmyd6VjaX6YWaHUJ15iIdLLLmPt0E9/51pi\nUv/V3JYI48ej2LPkkd2v5S9s2Pst1oSTz/IGK/btWZleKST/OcQSCzoFbwGG\nsccc8Hj4FRBVRYUBfhnhtpLdMAm0DQuCidnZ4DY0YSiezNc7x5CvzFLScLPx\ndiqf6W/WtdZsek/RnuQpwnslZLYz0ViJf/FIYrJdtqR3j9oQIYF3NPI1JP8A\nHn1UrAnx66E0ITRBbiBeM6pm89R0gKmC3/jyJ1mV+wZge9wGtTKafISru2j1\nrlgp7SHtOMAYy1VQdLHR7GwVZjqDAgripRXHWtKfPue41+aIJD2lMJS3qmTy\nJrw6c4KP4aJwgFuVPxLSKlxFKsg5oDkxtMLRKWpn4seiYdmuaDM03ddyigod\n2ds3hZLWiyhs/NGc9USSadg7mOgWka+zN/orGOpYnyrFeJgflEuOAmUORbec\nwo0g\r\n=AWcI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJFPSH4iXwQ3ChVGboV2CsxMzVoh4fSaF4cpbDuwpifAiBGcchClTOl+xtZwpSIwR0OC50hUAalP6AGfSK5OTAyaQ=="}],"size":4652,"noattachment":false,"key":"/@antv/color-util/-/@antv/color-util-2.0.3.tgz"},"maintainers":[{"email":"afc163@gmail.com","name":"afc163"},{"email":"army8735@qq.com","name":"army8735"},{"email":"i@hust.cc","name":"atool"},{"email":"576375879@qq.com","name":"baizn"},{"email":"bubkoo.wy@gmail.com","name":"bubkoo"},{"email":"ccnuzindex@gmail.com","name":"ccnuzindex"},{"email":"dengfuping_develop@163.com","name":"dengfuping"},{"email":"418466938@qq.com","name":"dori"},{"email":"dxq613@gmail.com","name":"dxq613"},{"email":"yilin.qyl@antfin.com","name":"elaine.q.10"},{"email":"yuanjiefeng@gmail.com","name":"jeffy2012"},{"email":"xinming002@gmail.com","name":"kasmine"},{"email":"wyy460342010@gmail.com","name":"kopiluwaky"},{"email":"leungwensen@gmail.com","name":"leungwensen"},{"email":"120635640@qq.com","name":"lzxue"},{"email":"neo.wang@vip.163.com","name":"neoddish"},{"email":"pyqiverson@gmail.com","name":"panyuqi"},{"email":"czynwu@gmail.com","name":"pomelo-nwu"},{"email":"360965398@qq.com","name":"sakuya223"},{"email":"sima.zhang1990@gmail.com","name":"simaq"},{"email":"yanyanwang93@gmail.com","name":"yanyan-wang"},{"email":"yezengyue@gmail.com","name":"zengyue"},{"email":"zqlu.cn@gmail.com","name":"zqlu"}],"_npmUser":{"name":"atool","email":"i@hust.cc"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/color-util_2.0.3_1582020231705_0.8427485870816207"},"_hasShrinkwrap":false,"readme":"# color-util\n\n> 为 `antv` 开发的轻量级工具方法库。\n\n\n## 安装下载\n\n> tnpm i --save @antv/util\n\n```js\n// 所有的 api 是都这么引入，名字不同而已\nimport { gradient } from '@antv/color-util';\n\nconst grad = gradient(['red', 'blue']);\nconst color1 = grad(0.1);\nconst color2 = grad(0.2);\n\n```\n\n\n## API 文档\n\n> 目前使用到的、且推荐使用的 API 文档，不在文档内的不建议使用。\n* rgb2arr('#ffeedd') 将 rgb 转换成 16 进制的数组\n* gradient(colors) ： 'Function' 渐变色计算\n\t+ colors ： 颜色的数组，例如 ['red', 'blue']\n\t+ 返回值是一个函数，可以传入百分百，返回函数\n ```js\nconst grad = gradient(['red', 'blue']);\nconst color1 = grad(0.1);\nconst color2 = grad(0.2);\n ```\n* toRGB(color) : 将颜色转换成 RGB 的格式\n\n```js\nimport { toRGB } from '@antv/color-util';\ntoRGB('red');\ntoRGB('rgb(240, 240, 233)');\n```\n\n\n","publish_time":1582020231819,"_cnpm_publish_time":1582020231819,"dist-tags":{"latest":"2.0.6"}}