{"_id":"yoctocolors@2.2.0","ava":{"environmentVariables":{"FORCE_COLOR":"1"}},"bugs":{"url":"https://github.com/sindresorhus/yoctocolors/issues"},"dist":{"shasum":"c4b68ee477f3982c33e4de24a5aa4a354be506d3","tarball":"http://registry-npm.ywwl.com/yoctocolors/download/yoctocolors-2.2.0.tgz","fileCount":7,"integrity":"sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg==","signatures":[{"sig":"MEYCIQDi8zYh9Em3kQ+DZr7BEXT6ivd3KloXgMorf/nBZNx5ZAIhAMOG4zJYVzReN92huj7Yv4mLVkSAFqpjHkJWBuDDBYyE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPkeFx40OLgPmucfjDiq55XB2spWiIMahJ7IwoOwOHgQIgSdOfDZr9nsIZ2Sq9KSE4dGoTauU1ff5pULi1mPRt3Uw="}],"unpackedSize":13519,"size":4538,"noattachment":false,"key":"/yoctocolors/-/yoctocolors-2.2.0.tgz"},"name":"yoctocolors","type":"module","types":"./index.d.ts","author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"a02a16ec36fbd58a0848e95598fb4913c54c7591","license":"MIT","scripts":{"test":"xo && ava && tsd"},"version":"2.2.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"homepage":"https://github.com/sindresorhus/yoctocolors#readme","keywords":["color","colour","colors","terminal","console","cli","string","ansi","style","styles","tty","formatting","shell","xterm","log","logging","command-line","text"],"repository":{"url":"git+https://github.com/sindresorhus/yoctocolors.git","type":"git"},"_npmVersion":"12.0.1","description":"The smallest and fastest command-line coloring package on the internet","directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"sideEffects":false,"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.58.0","ava":"^6.1.3","tsd":"^0.31.0","chalk":"^5.3.0","kleur":"^4.1.5","cli-color":"^2.0.4","colorette":"^2.0.20","nanocolors":"^0.2.13","picocolors":"^1.0.1","ansi-colors":"^4.1.3","@jonahsnider/benchmark":"^5.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yoctocolors_2.2.0_1785073175881_0.8395978980105034"},"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 below the text. *(Not widely supported)*\n- `underlineDouble` - Put a double horizontal line below the text. *(Not widely supported)*\n- `underlineCurly` - Put a curly horizontal line below the text. *(Not widely supported)*\n- `underlineDotted` - Put a dotted horizontal line below the text. *(Not widely supported)*\n- `underlineDashed` - Put a dashed horizontal line below the text. *(Not widely supported)*\n- `overline` - Put a horizontal line above 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### Underline colors\n\nThe underline color is set independently of the text color, so the color is only visible when an underline style is also applied. For example, `underlineRed(underlineCurly('typo'))` renders a red squiggle below otherwise unstyled text. *(Not widely supported)*\n\n- `underlineBlack`\n- `underlineRed`\n- `underlineGreen`\n- `underlineYellow`\n- `underlineBlue`\n- `underlineMagenta`\n- `underlineCyan`\n- `underlineWhite`\n- `underlineGray`\n- `underlineRedBright`\n- `underlineGreenBright`\n- `underlineYellowBright`\n- `underlineBlueBright`\n- `underlineMagentaBright`\n- `underlineCyanBright`\n- `underlineWhiteBright`\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","publish_time":1785073175966,"_cnpm_publish_time":1785073175966,"dist-tags":{"latest":"2.2.0"}}