2022-01-21 08:28:41 +00:00
|
|
|
# picocolors
|
|
|
|
|
2022-04-07 13:41:52 +00:00
|
|
|
The tiniest and the fastest library for terminal output formatting with ANSI colors.
|
2022-01-21 08:28:41 +00:00
|
|
|
|
|
|
|
```javascript
|
2022-04-07 13:41:52 +00:00
|
|
|
import pc from "picocolors"
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2022-04-07 13:41:52 +00:00
|
|
|
console.log(
|
|
|
|
pc.green(`How are ${pc.italic(`you`)} doing?`)
|
|
|
|
)
|
2022-01-21 08:28:41 +00:00
|
|
|
```
|
|
|
|
|
2022-04-07 13:41:52 +00:00
|
|
|
- **No dependencies.**
|
|
|
|
- **14 times** smaller and **2 times** faster than chalk.
|
|
|
|
- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
|
|
|
|
- Node.js v6+ & browsers support. Support for both CJS and ESM projects.
|
|
|
|
- TypeScript type declarations included.
|
|
|
|
- [`NO_COLOR`](https://no-color.org/) friendly.
|
2022-01-21 08:28:41 +00:00
|
|
|
|
|
|
|
## Docs
|
|
|
|
Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
|