Files
NapCatQQ/.pnpm-store/v3/files/17/ffc0e7ee44421d2a84d5f9a09d40bd4e86b353f637e1c9a7158436cd836d0e89483508c981397a6673024efddfeaa627ce8260e0ca0eed70143b8f68661b1d
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

41 lines
903 B
Plaintext

# kuler
Kuler is small and nifty node module that allows you to create terminal based
colors using hex color codes, just like you're used to doing in your CSS. We're
in a modern world now and terminals support more than 16 colors so we are stupid
to not take advantage of this.
## Installation
The package is released in the public npm registry and can be installed by
running:
```
npm install --save kuler
```
## Usage
To color a string simply pass it the string you want to have colored as first
argument and the color as hex as second argument:
```js
'use strict';
const kuler = require('kuler');
const str = kuler('foo', '#FF6600');
```
The color code sequence is automatically terminated at the end of the string so
the colors do no bleed to other pieces of text. So doing:
```js
console.log(kuler('red', '#F00'), 'normal');
```
Will work without any issues.
## License
[MIT](LICENSE)