alecrabbit/php-console-colour 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

alecrabbit/php-console-colour

最新稳定版本:0.10.1

Composer 安装命令:

composer require alecrabbit/php-console-colour

包简介

Helps to do colored console output.

README 文档

README

PHP Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads

Latest Stable Version Latest Version Latest Unstable Version

License

Installation

composer require alecrabbit/php-console-colour

Themes::class

Usage
$themes = new Themes();
echo $themes->red('This text is red.') . PHP_EOL;
echo $themes->underlinedBold('This text is underlined and bold.') . PHP_EOL;

Basically methods of this class just applying corresponding escape sequences to $text

// "\033[2;3mThis text is dark and italic.\033[0m"
$colorized = $themes->darkItalic('This text is dark and italic.')
Methods

Note: not all methods could be listed.

/**
 * @method comment(string $text)
 * @method error(string $text)
 * @method info(string $text)
 *
 * @method yellow(string $text)
 * @method red(string $text)
 * @method green(string $text)
 * @method cyan(string $text)
 * @method magenta(string $text)
 *
 * @method italic(string $text)
 * @method bold(string $text)
 * @method dark(string $text)
 * @method darkItalic(string $text)
 * @method white(string $text)
 * @method whiteBold(string $text)
 * @method underlined(string $text)
 * @method underlinedBold(string $text)
 * @method underlinedItalic(string $text)
 */

Note: new methods will be added. Pull requests are welcomed.

Define your own themes

ConsoleColor::class

// TODO

XTerm 256 Colors Table

example

Examples

example

example

Note: actual colors depend on your terminal color scheme

Links

统计信息

  • 总下载量: 34.6k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固