zeus/cli-color

PHP CLI colorize library, Spice up the terminal texts and backgrounds with PHP. It is especially used in terminal applications.

1.0.0 2020-09-03 18:31 UTC

This package is auto-updated.

Last update: 2024-10-28 04:31:46 UTC


README

Install

composer require zeus/cli-color

Using example

<?php


require_once "vendor/autoload.php";


use CliColorize\Background;
use CliColorize\Cli;

$cli = new Cli();


echo $cli->red('hello', Background::BLACK);
echo $cli->blue("world", Background::YELLOW);
echo $cli->purple("world", Background::YELLOW);

Available colors

Screenshot

using

Text colors examples

Background colors example