@abdelra7man/colorlogs 中文文档教程
ColorsLog
需要帮忙? 检查我们的 discord 支持服务器
Installation
npm i @abdelra7man/colorlogs
colors and styles
文本颜色
- blue
- gray
- cyan
- magenta
- red
- green
- yellow
- black
背景颜色
- bgBlue
- bgYellow
- bgGreen
- bgRed
- bgBlack
- bgMagenta
- bgCyan
- bgWhite
格式化
- bold
- italic
- underline
- inverse
- strikethrough
Usage
彩色文本
const logs = require("@abdelra7man/colorlogs")
console.log(logs.blue("hi")) // same for other colors
输出:
斜体
const logs = require("@abdelra7man/colorlogs")
console.log(logs.italic("hi"))
输出 = ℎ????
粗体
const logs = require("@abdelra7man/colorlogs")
console.log(logs.bold("hi"))
输出 = ????????
下划线
const logs = require("@abdelra7man/colorlogs")
console.log(logs.underline("hi"))
输出:
反向
const logs = require("@abdelra7man/colorlogs")
console.log(logs.inverse("hi"))
输出:
删除线
const logs = require("@abdelra7man/colorlogs")
console.log(logs.strikethrough("hi"))
输出:
你可以在字体示例中自定义颜色:
const logs = require("@abdelra7man/colorlogs")
console.log(logs.strikethrough(logs.blue("hi")))
输出:
ColorsLog
Need help? check our discord support server
Installation
npm i @abdelra7man/colorlogs
colors and styles
text colors
- blue
- gray
- cyan
- magenta
- red
- green
- yellow
- black
background colors
- bgBlue
- bgYellow
- bgGreen
- bgRed
- bgBlack
- bgMagenta
- bgCyan
- bgWhite
Formats
- bold
- italic
- underline
- inverse
- strikethrough
Usage
colored text
const logs = require("@abdelra7man/colorlogs")
console.log(logs.blue("hi")) // same for other colors
Output:
Italic
const logs = require("@abdelra7man/colorlogs")
console.log(logs.italic("hi"))
Output = ℎ????
Bold
const logs = require("@abdelra7man/colorlogs")
console.log(logs.bold("hi"))
Output = ????????
Underline
const logs = require("@abdelra7man/colorlogs")
console.log(logs.underline("hi"))
Output:
Inverse
const logs = require("@abdelra7man/colorlogs")
console.log(logs.inverse("hi"))
Output:
Strikethrough
const logs = require("@abdelra7man/colorlogs")
console.log(logs.strikethrough("hi"))
Output:
you can customize the color in the font example:
const logs = require("@abdelra7man/colorlogs")
console.log(logs.strikethrough(logs.blue("hi")))
Output: