This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

PHP helper functions to add colors to CLI output.

dev-master 2018-08-08 14:45 UTC

This package is auto-updated.

Last update: 2021-11-29 02:42:17 UTC


README

Some helper functions to add some color to PHP console output.

There are a number of functions available.

// Displays blue text
echo textblue('Hello World');

// Displays black text
echo textblack('Hello World');

// Displays red text
echo textred('Hello World');

// Displays green text
echo textgreen('Hello World');

// Send a custom color integer.
echo textcolor('Hello World', 36);

// Sets the background to be inverted of the current terminal background
echo bginverted('Hello World');

// Prints text as a new line
echo println('Hello World')

Functions can be used together with each other or in the middle of text:


echo println( textgreen('Success: ') . 'File has finished downloading.' );