承接 hhpack/color 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hhpack/color

最新稳定版本:1.3.0

Composer 安装命令:

composer require hhpack/color

包简介

Color package for Hack

README 文档

README

Latest Stable Version CircleCIDependency Status License

ScreenShot

Basic usage

The user can output to stdout by specifying the color.

Color::fromColor(ForegroundColor::White)
    ->background(BackgroundColor::Green)
    ->println('%s succeeded.', 'Color package example');

or

$color = Color::fromColor(ForegroundColor::White)
    ->background(BackgroundColor::Green);
$color('%s succeeded.', 'Color package example');

Applying styles

The user can use the applyTo method in order to apply a style to text.

$text = Color::fromColor(ForegroundColor::White)
    ->background(BackgroundColor::Green)
    ->applyTo('target text');

echo $text;

Custom style for text

The user can pull the bold and underline.

Color::fromColor(ForegroundColor::White)
    ->addStyle(StyleType::Bold)
    ->addStyle(StyleType::Underlined)
    ->println('%s + %s', 'bold', 'underlined');

Run the test

You can run the test with the following command.

composer install
composer test

统计信息

  • 总下载量: 471
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-02