{"_id":"yoctocolors","_rev":"4106588","name":"yoctocolors","description":"The smallest and fastest command-line coloring package on the internet","dist-tags":{"latest":"2.1.2"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-01-11T18:55:45.000Z","created":"2021-10-01T07:35:03.922Z","2.1.2":"2025-08-19T15:19:23.680Z","2.1.1":"2024-07-03T23:16:33.974Z","2.1.0":"2024-06-29T09:30:28.911Z","2.0.2":"2024-05-14T11:37:35.815Z","2.0.1":"2024-05-14T10:08:14.807Z","2.0.0":"2024-03-01T05:31:41.952Z","1.0.0":"2022-06-30T23:33:05.884Z","0.2.0":"2021-10-27T12:04:04.015Z","0.1.1":"2021-10-01T08:14:18.301Z","0.1.0":"2021-10-01T07:35:03.922Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"versions":{"2.1.2":{"name":"yoctocolors","version":"2.1.2","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.3","ansi-colors":"^4.1.3","ava":"^6.1.3","chalk":"^5.3.0","cli-color":"^2.0.4","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.1","tsd":"^0.31.0","xo":"^0.58.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"_id":"yoctocolors@2.1.2","gitHead":"ab9da8d65ff69b6dc107cfc048e3769d3a450de4","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"shasum":"d795f54d173494e7d8db93150cec0ed7f678c83a","size":3982,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-2.1.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yoctocolors_2.1.2_1755616763470_0.8767246258360861"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-19T15:19:23.680Z","publish_time":1755616763680,"_source_registry_name":"default","_cnpm_publish_time":1755616763680},"2.1.1":{"name":"yoctocolors","version":"2.1.1","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.3","ansi-colors":"^4.1.3","ava":"^6.1.3","chalk":"^5.3.0","cli-color":"^2.0.4","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.1","tsd":"^0.31.0","xo":"^0.58.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"_id":"yoctocolors@2.1.1","gitHead":"6b562004a4633abbdeec802768f64a7bce40d575","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_nodeVersion":"18.20.2","_npmVersion":"10.6.0","dist":{"shasum":"e0167474e9fbb9e8b3ecca738deaa61dd12e56fc","size":3857,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-2.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_2.1.1_1720048593763_0.4839517509613205"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-03T23:16:33.974Z","publish_time":1720048593974,"_source_registry_name":"default","_cnpm_publish_time":1720048593974},"2.1.0":{"name":"yoctocolors","version":"2.1.0","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.3","ansi-colors":"^4.1.3","ava":"^6.1.3","chalk":"^5.3.0","cli-color":"^2.0.4","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.1","tsd":"^0.31.0","xo":"^0.58.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"_id":"yoctocolors@2.1.0","gitHead":"13133224296d11ac752d24c68ced411594447e9e","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_nodeVersion":"20.12.2","_npmVersion":"10.6.0","dist":{"shasum":"27c6b15d38f7659d640580a7c4981bd56b59bcb9","size":3801,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-2.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_2.1.0_1719653428744_0.42383293477003225"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-06-29T09:30:28.911Z","publish_time":1719653428911,"_source_registry_name":"default","maintainers":[{"name":"sindresorhus","email":""}],"_cnpm_publish_time":1719653428911},"2.0.2":{"name":"yoctocolors","version":"2.0.2","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.3","ansi-colors":"^4.1.3","ava":"^6.1.3","chalk":"^5.3.0","cli-color":"^2.0.4","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.1","tsd":"^0.31.0","xo":"^0.58.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"_id":"yoctocolors@2.0.2","gitHead":"ebe9c872b6122f156a5130aa32a87986042eeda5","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_nodeVersion":"22.1.0","_npmVersion":"10.6.0","dist":{"shasum":"8e871e30d7eabb1976776e07a9fe2fe9a8c46fba","size":3680,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-2.0.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_2.0.2_1715686655684_0.17964993537413565"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-14T11:37:35.815Z","publish_time":1715686655815,"_source_registry_name":"default","_cnpm_publish_time":1715686655815},"2.0.1":{"name":"yoctocolors","version":"2.0.1","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.3","ansi-colors":"^4.1.3","ava":"^6.1.3","chalk":"^5.3.0","cli-color":"^2.0.4","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.1","tsd":"^0.31.0","xo":"^0.58.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"_id":"yoctocolors@2.0.1","gitHead":"348d96019f7e350b5bffc74adbace2713af35deb","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_nodeVersion":"22.1.0","_npmVersion":"10.6.0","dist":{"shasum":"f0be1e381c98a3c9f987d0cbfb8688c2fe99b15d","size":3694,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-2.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_2.0.1_1715681294668_0.6686575379608457"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-14T10:08:14.807Z","publish_time":1715681294807,"_source_registry_name":"default","_cnpm_publish_time":1715681294807},"2.0.0":{"name":"yoctocolors","version":"2.0.0","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.3","ansi-colors":"^4.1.3","ava":"^6.1.1","chalk":"^5.3.0","cli-color":"^2.0.3","colorette":"^2.0.20","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.0","tsd":"^0.30.7","xo":"^0.57.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"types":"./index.d.ts","gitHead":"f6be4f5765edf10df750c9aadab4f53bcb88fd21","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@2.0.0","_nodeVersion":"21.6.2","_npmVersion":"9.2.0","dist":{"shasum":"f6cd83f1fd0b211594810a6de413202d6d177075","size":3396,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_2.0.0_1709271101794_0.9381064935392858"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-01T05:31:41.952Z","publish_time":1709271101952,"_source_registry_name":"default","_cnpm_publish_time":1709271101952},"1.0.0":{"name":"yoctocolors","version":"1.0.0","description":"The smallest and fastest command-line coloring package on the internet","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"@jonahsnider/benchmark":"^5.0.0","ansi-colors":"^4.1.3","ava":"^4.3.0","chalk":"^5.0.1","cli-color":"^2.0.2","colorette":"^2.0.19","kleur":"^4.1.5","nanocolors":"^0.2.13","picocolors":"^1.0.0","tsd":"^0.22.0","xo":"^0.50.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"gitHead":"d3e66238e5944e09ee1496fe98a8dbcb37ae3911","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@1.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.3.2","dist":{"shasum":"6f6dd95d736adade55ff1eaf89aa737df1b69c94","size":3162,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-1.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_1.0.0_1656631985693_0.5054662161155177"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-01T12:04:40.244Z","publish_time":1656631985884,"_cnpm_publish_time":1656631985884},"0.2.0":{"name":"yoctocolors","version":"0.2.0","description":"The smallest and fastest command-line coloring package on the internet. Trust me.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.44.0"},"ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"types":"./index.d.ts","gitHead":"f1d8a97db6d4c60072beeebc9f96e5fc4a2ee694","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@0.2.0","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"d2fea56eb974afc75b7d010dc1f678c617b61a87","size":3013,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-0.2.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_0.2.0_1635336243883_0.8774496862154066"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T21:04:31.332Z","publish_time":1635336244015,"_cnpm_publish_time":1635336244015},"0.1.1":{"name":"yoctocolors","version":"0.1.1","description":"The smallest and fastest command-line coloring package on the internet. Trust me.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.44.0"},"gitHead":"111afbc70631f984388e67f78cbcd4b081172549","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@0.1.1","_nodeVersion":"16.9.1","_npmVersion":"7.20.3","dist":{"shasum":"95cde1d6fa5e25d52370d700321f6b319d133d0f","size":2610,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-0.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_0.1.1_1633076058084_0.33939890107518766"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T21:04:30.455Z","publish_time":1633076058301,"_cnpm_publish_time":1633076058301},"0.1.0":{"name":"yoctocolors","version":"0.1.0","description":"The smallest and fastest command-line coloring package on the internet. Trust me.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctocolors.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"devDependencies":{"ava":"^3.15.0","xo":"^0.44.0"},"gitHead":"bbd85df0b35f66b7cb4f0edfaede50b1c6069832","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","_id":"yoctocolors@0.1.0","_nodeVersion":"16.9.1","_npmVersion":"7.20.3","dist":{"shasum":"8f1caffb4de7c0718d173d4ffcd0b21da09e1464","size":2355,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/yoctocolors/download/yoctocolors-0.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctocolors_0.1.0_1633073703760_0.9688337544361993"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-27T21:04:29.546Z","publish_time":1633073703922,"_cnpm_publish_time":1633073703922}},"readme":"<sup>yoctocolors ????</sup>\n\n> The smallest and fastest command-line coloring package on the internet\n\n*Check out [Chalk](https://github.com/chalk/chalk) if you want something more mature and comprehensive.*\n\n## Highlights\n\n- Tiny\n- Fast\n- Handles nested colors\n- Tree-shakeable\n- No dependencies\n- Actively maintained\n\n## Install\n\nESM:\n\n```sh\nnpm install yoctocolors\n```\n\nOr CommonJS:\n\n```sh\nnpm install yoctocolors-cjs\n```\n\n## Usage\n\n```js\nimport colors from 'yoctocolors';\n\nconsole.log(colors.red('Yo!'));\n\nconsole.log(colors.blue(`Welcome to the ${colors.green('yoctocolors')} package!`));\n```\n\nYou can also import colors as named imports:\n\n```js\nimport {red, blue, green} from 'yoctocolors';\n\nconsole.log(red('Yo!'));\n\nconsole.log(blue(`Welcome to the ${green('yoctocolors')} package!`));\n```\n\n*This package supports [basic color detection](https://nodejs.org/api/tty.html#writestreamhascolorscount-env). Colors can be forcefully enabled by setting the `FORCE_COLOR` environment variable to `1` and can be forcefully disabled by setting `NO_COLOR` or `NODE_DISABLE_COLORS` to any value. [More info.](https://nodejs.org/api/tty.html#writestreamgetcolordepthenv)*\n\n## Styles\n\n### Modifiers\n\n- `reset` - Reset the current style.\n- `bold` - Make the text bold.\n- `dim` - Make the text have lower opacity.\n- `italic` - Make the text italic. *(Not widely supported)*\n- `underline` - Put a horizontal line above the text. *(Not widely supported)*\n- `overline` - Put a horizontal line below the text. *(Not widely supported)*\n- `inverse`- Invert background and foreground colors.\n- `hidden` - Print the text but make it invisible.\n- `strikethrough` - Put a horizontal line through the center of the text. *(Not widely supported)*\n\n### Colors\n\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `gray`\n- `redBright`\n- `greenBright`\n- `yellowBright`\n- `blueBright`\n- `magentaBright`\n- `cyanBright`\n- `whiteBright`\n\n### Background colors\n\n- `bgBlack`\n- `bgRed`\n- `bgGreen`\n- `bgYellow`\n- `bgBlue`\n- `bgMagenta`\n- `bgCyan`\n- `bgWhite`\n- `bgGray`\n- `bgRedBright`\n- `bgGreenBright`\n- `bgYellowBright`\n- `bgBlueBright`\n- `bgMagentaBright`\n- `bgCyanBright`\n- `bgWhiteBright`\n\n## Prior art\n\nYes\n\n## Benchmark\n\n```sh\n$ ./benchmark.js\n┌─────────┬────────────────┬─────────────┐\n│ (index) │ library        │ ops/sec     │\n├─────────┼────────────────┼─────────────┤\n│ 0       │ 'yoctocolors'  │ '8,000,000' │\n│ 1       │ 'colorette'    │ '8,000,000' │\n│ 2       │ 'picocolors'   │ '8,000,000' │\n│ 3       │ 'nanocolors'   │ '5,988,024' │\n│ 4       │ 'chalk'        │ '4,807,692' │\n│ 5       │ 'kleur/colors' │ '4,807,692' │\n│ 6       │ 'kleur'        │ '4,784,689' │\n│ 7       │ 'ansi-colors'  │ '2,178,649' │\n│ 8       │ 'cli-color'    │ '585,138'   │\n└─────────┴────────────────┴─────────────┘\n```\n\n*See [benchmark.js](benchmark.js).*\n\n## FAQ\n\n### What is yocto?\n\n[It was the smallest official unit prefix in the metric system until 2022.](https://en.wikipedia.org/wiki/Yocto-) Much smaller than nano.\n\n## Related\n\n- [yoctodelay](https://github.com/sindresorhus/yoctodelay) - Delay a promise a given amount of time\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling\n","_attachments":{},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"license":"MIT"}