PHP Classes

PHP Console Color Text: Display colored text in a terminal console

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 38 All time: 10,848 This week: 101Up
Version License PHP version Categories
consolacolortextphp 1MIT/X Consortium ...7PHP 5, Time and Date, Console


This class can display colored text in a terminal console.

It can take some parameters to render text with colors and returns a text string that will make the text appear in a terminal console with the given colors with specific color names.

Currently, it supports parameters that define the text string, the background color, the foreground color, etc.

Picture of adam berger
  Performance   Level  
Name: adam berger <contact>
Classes: 23 packages by
Country: Poland Poland
Age: ???
All time rank: 74521 in Poland Poland
Week rank: 117 Up2 in Poland Poland Up
Innovation award
Innovation award
Nominee: 8x

Winner: 2x


// "N":"B":"U":
 // BLACK Color Text
 // RED Color Text
 // GREEN Color Text
 // YELLOW Color Text
 // BLUE Color Text
 // Magenta Color Text
 // CYAN Color Text
 // WHITE Color Text
require_once 'src\ClassApp\ColorTextConsole.php';


$colorTextConsole = new ColorTextConsole("GREEN","0","0","0","N","N","color test console: GREEN");
$colorTextConsole = new ColorTextConsole("MAGENTA","0","0","0","N","N","color and backgrund test console: MAGENTA ");
$colorTextConsole = new ColorTextConsole("YELLOW","0","0","0","N","N","color test console: YELLOW");
$colorTextConsole = new ColorTextConsole("BLUE","0","0","0","N","N","color test console: BLUE");
$colorTextConsole = new ColorTextConsole("CYAN","0","0","0","N","N","color test console: CYAN");
$colorTextConsole = new ColorTextConsole("GREEN","0","0","0","B","N","color and backgrund test console: GREEN and Charakter BOLD");
$colorTextConsole = new ColorTextConsole("GREEN","0","WHITE","0","B","N","color and backgrund test console: GREEN and WHITE");


Consola Powershell Color Text To PHP

The class allows you to enter colors in the console powershell for PHP


This is an image

  • ConsolaColorAll-640px
  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageClassApp (1 file)

  Files folder image Files  /  src  /  ClassApp  
File Role Description
  Plain text file ColorTextConsole.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,848
This week:101Up