php-cli-colorPHP 命令行输出彩色
一个简单的 PHP 命令行 cli 输出彩色的类库
安装
composer require wujunze/php-cli-color '~1.0'
使用
getColoredString("Testing Colors class, this is purple string on yellow background.", "purple", "yellow") . PHP_EOL; echo $colors->getColoredString("Testing Colors class, this is blue string on light gray background.", "blue", "light_gray") . PHP_EOL; echo $colors->getColoredString("Testing Colors class, this is red string on black background.", "red", "black") . PHP_EOL; echo $colors->getColoredString("Testing Colors class, this is cyan string on green background.", "cyan", "green") . PHP_EOL; echo $colors->getColoredString("Testing Colors class, this is cyan string on default background.", "cyan") . PHP_EOL; echo $colors->getColoredString("Testing Colors class, this is default string on cyan background.", null, "cyan") . PHP_EOL;
结果
评论
Jansi控制台输出彩色文字
Jansi(jAnsi)是一个Java类库,它能够让你在控制台输出色彩缤纷的文字。示例代码:AnsiConsole.systemInstall();AnsiConsole.out.println("H
Jansi控制台输出彩色文字
0
ColorfulConsoleIO终端输出彩色字符库
C++使用的在命令行终端输出各种颜色字符的库八种字体颜色和对应的高亮颜色共十六种八种字体背景颜色
ColorfulConsoleIO终端输出彩色字符库
0
ColorfulConsoleIO终端输出彩色字符库
C++使用的在命令行终端输出各种颜色字符的库八种字体颜色和对应的高亮颜色共十六种八种字体背景颜色
ColorfulConsoleIO终端输出彩色字符库
0