跳到主要内容
CNode

用来样式化(彩色)输出到终端的文字的模块。

社区
Kkankungyip发布于 12 年前
048910

之前用了几个都觉得麻烦,索性自己写了一个。

Terminal Text Styled

Terminal display styled text tool. The styled format: #[foreground [background]] [style]...{ text }.

Installation

$ npm install terminal-styled

Usage

var show = require('terminal-styled');
// Normal color
show('I am a #red{ %s }.', 'Red');
// RGB color
show('I am a #239,67,165{ Color }.');
// Grayscale
show('I am a #13{ Grayscale }.');
// Blod and red
show('I am #red blod{ Blod and red }.');

GitHub

https://github.com/kankungyip/terminal-styled/

Copyright (c) 2014 Kan Kung-Yip

查看回复

回复 (0)

暂无回复,成为第一个参与讨论的人。

参与回复

登录后即可参与回复。登录