Skip to content

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

Notifications You must be signed in to change notification settings

diloabininyeri/cli-colorize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cli Colorize

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

Text (Method name) Background (Constants)
black Background::RED
dark_gray Background::BLACK
green Background::GREEN
light_green Background::YELLOW
red Background::BLUE
light_red Background::MAGENTA
blue Background::CYAN
light_blue Background::LIGHT_GRAY
cyan
light_cyan
light_purple
brown
white
purple
magenta
light_magenta

Screenshot

using

Text colors examples

Background colors example

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published