tdtrung17693/php-chalk 问题修复 & 功能扩展

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

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

tdtrung17693/php-chalk

Composer 安装命令:

composer require tdtrung17693/php-chalk

包简介

Just another PHP terminal string styling library

README 文档

README

A PHP terminal styling library inspired by Chalk

Features

  • Support 16 colors, 256 colors and Truecolor (16m colors) mode.
  • Support style chaining.
  • Support style nesting.

Installation

Through composer

composer require tdtrung17693/php-chalk

Manually:

Just download/clone this repo

Usage

See examples to know more about how to use this library.

print $chalk->bold->green("Bold Green");
print "\n";
print $chalk->underscore->color220->bgColor20("Blink Foreground 220 Background 20");
print "\n";
print $chalk->rgb(200, 20, 100)->inverse("Inverse");

// Style nesting
print $chalk->red("Red then", $chalk->bold->green("bold and green then"), $chalk->reset("back to normal\n"));

Screenshot:

Examples

Color blocks

API

$chalk-><style>[-><style>...](string, [string...])

Example: $chalk->bgGreen->red->bold('Background green red bold text')

$chalk->hasColorSupport(), $chalk->has256Support(), $chalk->has16mSupport()

Return true if the corresponding feature is supported.

Styles supported

  • reset, bold, dim, underscore, italic, strikethrough, blink.
  • red, green, yellow, blue, magenta, cyan, white
  • lightGray, darkGray, lightRed, lightGreen, lightYellow, lightBlue, lightMagenta, lightCyan
  • Each of the color styles above with the prefix bg

Contribute

Feel free to contribute by forking or making suggestions.

统计信息

  • 总下载量: 255
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: Apache-2
  • 更新时间: 2019-06-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固