{"_id":"gradient-string","_rev":"3934490","name":"gradient-string","description":"Beautiful color gradients in terminal output","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"bokub","email":""}],"time":{"modified":"2025-09-01T01:30:04.000Z","created":"2017-07-18T18:02:31.510Z","3.0.0":"2024-09-27T21:01:42.720Z","2.0.2":"2022-09-06T09:38:58.618Z","2.0.1":"2022-04-19T10:06:11.493Z","2.0.0":"2021-11-26T14:17:12.662Z","1.2.0":"2018-09-19T05:57:35.550Z","1.1.0":"2018-03-29T19:32:14.207Z","1.0.0":"2017-10-27T12:51:07.306Z","0.1.2":"2017-08-07T06:22:10.579Z","0.1.1":"2017-07-21T09:23:15.338Z","0.1.0":"2017-07-20T20:24:49.160Z","0.0.2":"2017-07-18T18:21:36.652Z","0.0.1":"2017-07-18T18:02:31.510Z"},"users":{},"author":{"name":"Boris K"},"repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"versions":{"3.0.0":{"name":"gradient-string","description":"Beautiful color gradients in terminal output","version":"3.0.0","author":{"name":"Boris K"},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","type":"module","scripts":{"build":"rm -fr dist && tsc && rm -fr dist/*.spec.*","built-in":"[ ! -f dist/index.js ] && npm run build; node examples/built-in.js","test":"vitest run","coverage":"vitest run --coverage","demo":"[ ! -f dist/index.js ] && npm run build; node examples/demo.js","lint":"prettier --check .","prepare":"husky","prepublishOnly":"npm run build"},"dependencies":{"chalk":"^5.3.0","tinygradient":"^1.1.5"},"devDependencies":{"@bokub/prettier-config":"^2.1.0","@vitest/coverage-v8":"^2.1.1","husky":"^9.1.6","lint-staged":"^15.2.10","prettier":"^3.3.3","typescript":"^5.6.2","vitest":"^2.1.1"},"engines":{"node":">=14"},"repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"homepage":"https://github.com/bokub/gradient-string","bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"prettier":"@bokub/prettier-config","lint-staged":{"*":"prettier --write --ignore-unknown"},"_id":"gradient-string@3.0.0","gitHead":"ca0c941216029e6a36d76a0cbebc0dca50355f54","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"shasum":"716d6d6f35309513fa92d38f506c6df0ce1f5ebb","size":6095,"noattachment":false,"key":"/gradient-string/-/gradient-string-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-3.0.0.tgz"},"_npmUser":{"name":"bokub","email":"bbbbbokk@gmail.com"},"directories":{},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string_3.0.0_1727470902533_0.2631152138308934"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-27T21:01:42.720Z","publish_time":1727470902720,"_source_registry_name":"default","_cnpm_publish_time":1727470902720},"2.0.2":{"name":"gradient-string","description":"Beautiful color gradients in terminal output","version":"2.0.2","author":{"name":"Boris K"},"license":"MIT","main":"index.js","scripts":{"built-in":"node examples/built-in.js","coverage":"c8 report --reporter=text-lcov > coverage.lcov","demo":"node examples/demo.js","fix":"xo --fix","lint":"xo","test":"cross-env FORCE_COLOR=1 c8 ava","prepare":"husky install"},"dependencies":{"chalk":"^4.1.2","tinygradient":"^1.1.5"},"devDependencies":{"ava":"^3.15.0","c8":"^7.11.2","cross-env":"^7.0.3","esm":"^3.2.25","xo":"^0.48.0","husky":"^7.0.4"},"engines":{"node":">=10"},"repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"homepage":"https://github.com/bokub/gradient-string","bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"ava":{"require":["esm"]},"xo":{"rules":{"comma-dangle":"off","node/prefer-global/buffer":"off","operator-linebreak":"off","padding-line-between-statements":"off","unicorn/prefer-module":"off","unicorn/prefer-regexp-test":"off","unicorn/prefer-spread":"off","unicorn/prevent-abbreviations":"off"}},"gitHead":"7f49bdd2289af0df6d1a28fe449579119ff800fc","_id":"gradient-string@2.0.2","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"a90402618990ec993ecbb72a56bd7e6598f45c0e","size":4608,"noattachment":false,"key":"/gradient-string/-/gradient-string-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-2.0.2.tgz"},"_npmUser":{"name":"bokub","email":"bbbbbokk@gmail.com"},"directories":{},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string_2.0.2_1662457138484_0.7132555650249015"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-06T11:17:08.108Z","publish_time":1662457138618,"_cnpm_publish_time":1662457138618},"2.0.1":{"name":"gradient-string","description":"Beautiful color gradients in terminal output","version":"2.0.1","author":{"name":"Boris K"},"license":"MIT","main":"index.js","scripts":{"built-in":"node examples/built-in.js","coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov","demo":"node examples/demo.js","fix":"xo --fix","test":"xo && nyc cross-env FORCE_COLOR=1 ava"},"dependencies":{"chalk":"^4.1.2","tinygradient":"^1.1.5"},"devDependencies":{"ava":"^3.15.0","codecov":"^3.8.3","cross-env":"^7.0.3","esm":"^3.2.25","nyc":"^15.1.0","xo":"^0.48.0"},"engines":{"node":">=10"},"repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"homepage":"https://github.com/bokub/gradient-string","bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"ava":{"require":["esm"]},"xo":{"rules":{"comma-dangle":"off","node/prefer-global/buffer":"off","operator-linebreak":"off","padding-line-between-statements":"off","unicorn/prefer-module":"off","unicorn/prefer-regexp-test":"off","unicorn/prefer-spread":"off","unicorn/prevent-abbreviations":"off"}},"gitHead":"2d1c925a65ac067276a0df7b7c7c2cfa2fd5051e","_id":"gradient-string@2.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"shasum":"ea21740ce8fc0beaac16888ee60f6732985b4c83","size":4576,"noattachment":false,"key":"/gradient-string/-/gradient-string-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-2.0.1.tgz"},"_npmUser":{"name":"bokub","email":"bbbbbokk@gmail.com"},"directories":{},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string_2.0.1_1650362771320_0.16281912789606023"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-19T10:11:46.958Z","publish_time":1650362771493,"_cnpm_publish_time":1650362771493},"2.0.0":{"name":"gradient-string","description":"Beautiful color gradients in terminal output","version":"2.0.0","author":{"name":"Boris K"},"license":"MIT","main":"index.js","scripts":{"built-in":"node examples/built-in.js","coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov","demo":"node examples/demo.js","fix":"xo --fix","test":"xo && nyc cross-env FORCE_COLOR=1 ava"},"dependencies":{"chalk":"^4.1.2","tinygradient":"^1.1.5"},"devDependencies":{"ava":"^3.15.0","codecov":"^3.8.3","cross-env":"^7.0.3","nyc":"^15.1.0","xo":"0.23.0"},"engines":{"node":">=10"},"repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"homepage":"https://github.com/bokub/gradient-string","bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"ava":{"require":["esm"]},"gitHead":"86c6eb120b9e1695ebd1eb5273cae3f60acdbb0f","_id":"gradient-string@2.0.0","_nodeVersion":"10.24.1","_npmVersion":"6.14.12","dist":{"shasum":"0333846e88e6011bdd12fa73d0fa2a60dfd34f51","size":4463,"noattachment":false,"key":"/gradient-string/-/gradient-string-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-2.0.0.tgz"},"_npmUser":{"name":"bokub","email":"bbbbbokk@gmail.com"},"directories":{},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string_2.0.0_1637936232469_0.22766058184663196"},"_hasShrinkwrap":false,"publish_time":1637936232662,"_cnpm_publish_time":1637936232662,"_cnpmcore_publish_time":"2021-12-16T16:18:40.360Z"},"1.2.0":{"name":"gradient-string","description":"Beautiful color gradients in terminal output","version":"1.2.0","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.4.1","tinygradient":"^0.4.1"},"devDependencies":{"ava":"^0.25.0","codecov":"^3.1.0","cross-env":"^5.2.0","nyc":"^13.1.0","xo":"^0.23.0"},"engines":{"node":">=4"},"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"built-in":"node examples/built-in.js","coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov","demo":"node examples/demo.js","fix":"xo --fix","test":"xo && nyc cross-env FORCE_COLOR=1 ava"},"gitHead":"415263d1529910c73f85377e8642ff1c2d46cd4d","_id":"gradient-string@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"93f39f2c7c8dcb095608c2ccf0aac24aa315fbac","size":4448,"noattachment":false,"key":"/gradient-string/-/gradient-string-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-1.2.0.tgz"},"maintainers":[{"name":"bokub","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string_1.2.0_1537336655348_0.49454414494541465"},"_hasShrinkwrap":false,"publish_time":1537336655550,"_cnpm_publish_time":1537336655550,"_cnpmcore_publish_time":"2021-12-16T16:18:40.620Z"},"1.1.0":{"name":"gradient-string","description":"Beautiful color gradients in terminal output","version":"1.1.0","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.3.2","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.25.0","codecov":"^3.0.0","nyc":"^11.6.0","xo":"^0.20.3"},"engines":{"node":">=4"},"files":["index.js"],"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"built-in":"node examples/built-in.js","coverage":"nyc report --reporter=text-lcov > coverage.lcov && codecov","demo":"node examples/demo.js","fix":"xo --fix","test":"xo && nyc ava"},"gitHead":"3e5013ea3092822acc8e5f55be46ffe821184f4e","_id":"gradient-string@1.1.0","_shasum":"3a4948ca7fd8f7396a8f1957918821b9a11112c0","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"3a4948ca7fd8f7396a8f1957918821b9a11112c0","size":4268,"noattachment":false,"key":"/gradient-string/-/gradient-string-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-1.1.0.tgz"},"maintainers":[{"name":"bokub","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string_1.1.0_1522351934108_0.9428970093135098"},"_hasShrinkwrap":false,"publish_time":1522351934207,"_cnpm_publish_time":1522351934207,"_cnpmcore_publish_time":"2021-12-16T16:18:40.888Z"},"1.0.0":{"name":"gradient-string","description":"Beautiful gradients in terminal stdout","version":"1.0.0","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.2.0","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.21.0","xo":"^0.18.2"},"engines":{"node":">=4"},"files":["index.js"],"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"built-in":"node examples/built-in.js","demo":"node examples/demo.js","test":"xo && ava"},"gitHead":"fca9483d01154d0561b5bac98c5904f561ef35b5","_id":"gradient-string@1.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"093bd02c2eadf94afbe674c479b3b7a898411170","size":4127,"noattachment":false,"key":"/gradient-string/-/gradient-string-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-1.0.0.tgz"},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string-1.0.0.tgz_1509108666427_0.2870674002915621"},"directories":{},"publish_time":1509108667306,"_hasShrinkwrap":false,"_cnpm_publish_time":1509108667306,"_cnpmcore_publish_time":"2021-12-16T16:18:41.096Z"},"0.1.2":{"name":"gradient-string","description":"Beautiful gradients in terminal stdout","version":"0.1.2","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.1.0","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.21.0","xo":"^0.18.2"},"engines":{"node":">=4"},"files":["index.js"],"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"built-in":"node examples/built-in.js","demo":"node examples/demo.js","test":"xo && ava"},"gitHead":"5660ad956f483ffb7fb0099313950ef2861484c9","_id":"gradient-string@0.1.2","_shasum":"178bc6e0356f14d0adac9940c3040ab81a7783b3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"178bc6e0356f14d0adac9940c3040ab81a7783b3","size":3601,"noattachment":false,"key":"/gradient-string/-/gradient-string-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-0.1.2.tgz"},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string-0.1.2.tgz_1502086929584_0.7421476705931127"},"directories":{},"publish_time":1502086930579,"_hasShrinkwrap":false,"_cnpm_publish_time":1502086930579,"_cnpmcore_publish_time":"2021-12-16T16:18:41.425Z"},"0.1.1":{"name":"gradient-string","description":"Beautiful gradients in terminal stdout","version":"0.1.1","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.0.1","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.21.0","xo":"^0.18.2"},"engines":{"node":">=4"},"files":["index.js"],"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"built-in":"node examples/built-in.js","demo":"node examples/demo.js","test":"xo && ava"},"gitHead":"33de04cc117a4b81bf90b0d5dfe92e4947fc6436","_id":"gradient-string@0.1.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"d0e61348d7a4d5b7b049ce5f75d06037a24779b9","size":2942,"noattachment":false,"key":"/gradient-string/-/gradient-string-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-0.1.1.tgz"},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string-0.1.1.tgz_1500628994410_0.9782097432762384"},"directories":{},"publish_time":1500628995338,"_hasShrinkwrap":false,"_cnpm_publish_time":1500628995338,"_cnpmcore_publish_time":"2021-12-16T16:18:41.651Z"},"0.1.0":{"name":"gradient-string","description":"Beautiful gradients in terminal stdout","version":"0.1.0","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.0.1","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.21.0","xo":"^0.18.2"},"engines":{"node":">=4"},"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"test":"xo && ava","demo":"node examples/demo.js","built-in":"node examples/built-in.js"},"gitHead":"d767e65b41df22b403735ff39e0781542820d09c","_id":"gradient-string@0.1.0","_shasum":"c10b1b1c5952d142f5f3ccdf7b38ad5df2e0a72d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"c10b1b1c5952d142f5f3ccdf7b38ad5df2e0a72d","size":4182,"noattachment":false,"key":"/gradient-string/-/gradient-string-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-0.1.0.tgz"},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string-0.1.0.tgz_1500582288132_0.3282981151714921"},"directories":{},"publish_time":1500582289160,"_hasShrinkwrap":false,"_cnpm_publish_time":1500582289160,"_cnpmcore_publish_time":"2021-12-16T16:18:41.841Z"},"0.0.2":{"name":"gradient-string","description":"Beautiful gradients in terminal stdout","version":"0.0.2","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.0.1","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.21.0","xo":"^0.18.2"},"engines":{"node":">=4"},"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"test":"xo && ava"},"gitHead":"84e95a1656f90f8224517d1b97836797ed211b74","_id":"gradient-string@0.0.2","_shasum":"6034c9f2dd1d7247c4dcebcdbc52fc0d05d2ef2a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"6034c9f2dd1d7247c4dcebcdbc52fc0d05d2ef2a","size":2468,"noattachment":false,"key":"/gradient-string/-/gradient-string-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-0.0.2.tgz"},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string-0.0.2.tgz_1500402095694_0.7634137456770986"},"directories":{},"publish_time":1500402096652,"_hasShrinkwrap":false,"_cnpm_publish_time":1500402096652,"_cnpmcore_publish_time":"2021-12-16T16:18:42.074Z"},"0.0.1":{"name":"gradient-string","description":"Beautiful gradients in terminal stdout","version":"0.0.1","author":{"name":"Boris K"},"bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"dependencies":{"chalk":"^2.0.1","tinygradient":"^0.3.1"},"devDependencies":{"ava":"^0.21.0","xo":"^0.18.2"},"homepage":"https://github.com/bokub/gradient-string","keywords":["cli","color","colors","colour","command-line","console","formatting","gradient","gradients","log","logging","shell","string","style","styles","terminal"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/bokub/gradient-string.git"},"scripts":{"test":"xo && ava"},"gitHead":"cdbdba5d36adf6e1f3818b5fdc4421615f101b2b","_id":"gradient-string@0.0.1","_shasum":"cb66d69432847d2b9c1395d25980dd66cc830ef5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"bokub","email":"npm.bokub@mail.com"},"dist":{"shasum":"cb66d69432847d2b9c1395d25980dd66cc830ef5","size":2370,"noattachment":false,"key":"/gradient-string/-/gradient-string-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gradient-string/download/gradient-string-0.0.1.tgz"},"maintainers":[{"name":"bokub","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-string-0.0.1.tgz_1500400950584_0.09779678983613849"},"directories":{},"publish_time":1500400951510,"_hasShrinkwrap":false,"_cnpm_publish_time":1500400951510,"_cnpmcore_publish_time":"2021-12-16T16:18:42.327Z"}},"readme":"# gradient-string\n\n[![Build Status][build-src]][build-href]\n[![Version][version-src]][version-href]\n[![Codecov][codecov-src]][codecov-href]\n[![Downloads][downloads-src]][downloads-href]\n[![code style: prettier][code-style-src]][code-style-href]\n[![Mentioned in Awesome Node.js][awesome-src]][awesome-href]\n\n> Beautiful color gradients in terminal output\n\n[![gradient-string](http://bit.ly/gradient-string-preview)](http://bit.ly/gradient-string-large)\n\n## Install\n\n```\n$ npm i gradient-string\n```\n\n## Usage\n\n```javascript\nimport gradient from 'gradient-string';\n\nconsole.log(gradient(['cyan', 'pink'])('Hello world!'));\n```\n\n### Initialize a gradient\n\n```javascript\n// Provide an array of colors\nconst coolGradient = gradient(['#FF0000', '#00FF00', '#0000FF']);\n```\n\nThe colors are parsed with TinyColor, [multiple formats are accepted](https://github.com/bgrins/TinyColor/blob/master/README.md#accepted-string-input).\n\n```javascript\nconst coolGradient = gradient([\n  tinycolor('#FFBB65'), // tinycolor object\n  { r: 0, g: 255, b: 0 }, // RGB object\n  { h: 240, s: 1, v: 1, a: 1 }, // HSVa object\n  'rgb(120, 120, 0)', // RGB CSS string\n  'gold', // named color\n]);\n```\n\n### Use a gradient\n\n```javascript\nconst coolString = coolGradient('This is a fancy string!');\nconsole.log(coolString);\n```\n\n## Built-in gradients\n\n### Usage\n\n```javascript\nimport { rainbow, pastel } from 'gradient-string';\n\n// Use the pastel built-in gradient\nconsole.log(pastel('I love gradient-string!'));\n\n// Use the rainbow built-in gradient\nconsole.log(rainbow('It is so pretty! ????'));\n```\n\n### Available built-in gradients\n\n[![Built-in gradients](http://bit.ly/2uFygrL)](http://bit.ly/2ufX07r)\n\n## Multi line gradients\n\nIn some cases, you may want to apply the same horizontal gradient on each line of a long text (or a piece of ASCII art).\n\nYou can use the `multiline()` method of a gradient to ensure that the colors are vertically aligned.\n\n```javascript\nimport gradient, { rainbow } from 'gradient-string';\n\n// Use the same gradient on every line\nconst duck = gradient(['green', 'yellow']).multiline(`\n  __\n<(o )___\n ( ._> /\n   ---\n`);\nconsole.log(duck);\n\n// Works with aliases\nrainbow.multiline('Multi line\\nstring');\n\n// Works with advanced options (read below)\ngradient(['cyan', 'pink'], { interpolation: 'hsv' }).multiline('Multi line\\nstring');\n```\n\n## Advanced gradients\n\nThere are also more advanced options for gradient customization, such as custom color stops, or choice of color interpolation\n\n### Custom color stops\n\nBy default, the gradient color stops are distributed equidistantly.\n\nYou can specify the position of each color stop (between `0` and `1`), using the following syntax:\n\n```javascript\nlet coolGradient = gradient([\n  { color: '#d8e0de', pos: 0 },\n  { color: '#255B53', pos: 0.8 },\n  { color: '#000000', pos: 1 },\n]);\n```\n\n### Color interpolation\n\nWhen creating a gradient, you can provide a second parameter to choose how the colors will be generated.\n\nHere is the full `gradient` API:\n\n#### `gradient([colors], options?)(text)`\n\n##### colors\n\nType: `Array<Color>`<br>\nColors of the gradient. [Multiple formats are accepted](https://github.com/bgrins/TinyColor/blob/master/README.md#accepted-string-input).\n\n##### text\n\nType: `String`<br>\nString you want to color.\n\n##### options\n\nType: `Object` _(optional)_<br>\n\n###### interpolation\n\nType: `string`<br>\nThe gradient can be generated using RGB or HSV interpolation. HSV usually produces brighter colors.\n`interpolation` can be set to `rgb` for RGB interpolation, or`hsv` for HSV interpolation.<br>\nDefaults to `rgb`. Case-insensitive\n\n###### hsvSpin\n\nType: `string`<br>\nUsed only in the case of HSV interpolation.<br>\nBecause hue can be considered as a circle, there are two ways to go from a color to another color.<br>\n`hsvSpin` can be either `short` or `long`, depending on if you want to take the shortest or the longest way between two colors.<br>\nDefaults to `short`. Case-insensitive\n\n#### Example\n\n##### Code\n\n```javascript\nconst str = '■'.repeat(48);\n\n// Standard RGB gradient\nconst standardRGBGradient = gradient(['red', 'green']);\n\n// Short HSV gradient: red -> yellow -> green\nconst shortHSVGradient = gradient(['red', 'green'], { interpolation: 'hsv' });\n\n// Long HSV gradient: red -> magenta -> blue -> cyan -> green\nconst longHSVGradient = gradient(['red', 'green'], { interpolation: 'hsv', hsvSpin: 'long' });\n\nconsole.log(standardRGBGradient(str));\nconsole.log(shortHSVGradient(str));\nconsole.log(longHSVGradient(str));\n```\n\n##### Result\n\n![Example result](http://i.imgur.com/plQAN2Q.png)\n\n## Dependencies\n\n- [chalk](https://github.com/chalk/chalk) - Output colored text to terminal\n- [tinygradient](https://github.com/mistic100/tinygradient) - Generate gradients\n\n## Who uses gradient-string?\n\n- [Shopify](https://shopify.com/) in [Shopify CLI](https://www.npmjs.com/package/@shopify/cli-kit?activeTab=dependencies#:~:text=gradient&text=string)\n- [Microsoft](https://microsoft.com) in [@lage-run/reporters](https://www.npmjs.com/package/@lage-run/reporters?activeTab=dependencies#:~:text=gradient&text=string)\n- [Tencent](https://www.tencent.com/) in [Cloudbase Framework](https://www.npmjs.com/package/@cloudbase/framework-core#:~:text=gradient&text=string)\n- [Fireship](https://fireship.io/) in [this YouTube video](https://youtu.be/_oHByo8tiEY?si=3AKfAfOMXI0d9Ay6&t=76), where he shows how he built [javascript-millionaire](https://github.com/fireship-io/javascript-millionaire)\n- [Turoborepo](https://turbo.build/) in [@turbo/workspaces](https://www.npmjs.com/package/@turbo/workspaces?activeTab=dependencies#:~:text=gradient&text=string) and [@turbo/codemod](https://www.npmjs.com/package/@turbo/codemod?activeTab=dependencies#:~:text=gradient&text=string)\n- [Magic UI](https://magicui.design/) in [Magic UI CLI](https://www.npmjs.com/package/magicui-cli?activeTab=dependencies)\n- [Myself](https://github.com/bokub) in [chalk-animation](https://github.com/bokub/chalk-animation), the animated version of gradient-string\n- [Sindre Sorhus](https://github.com/sindresorhus) in [ink-gradient](https://www.npmjs.com/package/ink-gradient?activeTab=dependencies#:~:text=gradient&text=string), the [Ink](https://github.com/vadimdemedes/ink) version of gradient-string\n- [And ![](https://flat.badgen.net/github/dependents-repo/bokub/gradient-string?color=000&label=) more...](https://github.com/bokub/gradient-string/network/dependents), who downloaded gradient-string [![Downloads](https://flat.badgen.net/npm/dt/gradient-string?color=000&label=) times!][downloads-href]\n\n## License\n\nMIT © [Boris K](https://github.com/bokub)\n\n[build-src]: https://flat.badgen.net/github/checks/bokub/gradient-string?label=tests\n[version-src]: https://gradgen.bokub.workers.dev/npm/v/gradient-string?gradient=b65cff,11cbfa&style=flat&label=version\n[codecov-src]: https://img.shields.io/codecov/c/github/bokub/rgb-light-card?style=flat-square\n[downloads-src]: https://flat.badgen.net/npm/dw/gradient-string?color=FF9800\n[code-style-src]: https://flat.badgen.net/badge/code%20style/prettier/ff69b4\n[awesome-src]: https://awesome.re/mentioned-badge-flat.svg\n[build-href]: https://github.com/bokub/gradient-string/actions/workflows/run.yml\n[version-href]: https://www.npmjs.com/package/gradient-string\n[codecov-href]: https://codecov.io/gh/bokub/gradient-string\n[downloads-href]: https://www.npmjs.com/package/gradient-string\n[code-style-href]: https://github.com/bokub/prettier-config\n[awesome-href]: https://github.com/sindresorhus/awesome-nodejs\n","_attachments":{},"homepage":"https://github.com/bokub/gradient-string","bugs":{"url":"https://github.com/bokub/gradient-string/issues"},"license":"MIT"}