Pretty Console for PHP
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.md
PrettyConsole.class.php
README.md

README.md

Pretty Console for PHP

Screenshot

This is a PHP class that outputs color formatted strings for the console. It has a public API that supports several methods of calling as can be seen below. Works best with xterm-256color as your TERM.

include("PrettyConsole.class.php");

// direct output of formatted string
$output = PrettyConsole::output("PrettyConsole::output",248,0) . "\n";

// echo string with foreground on background with newline
PrettyConsole::puts0on146("PrettyConsole::puts0on146");
PrettyConsole::puts0on147("PrettyConsole::puts255on147");

// echo string white on black with newline
PrettyConsole::puts("PrettyConsole::puts");

// return string without any appended new line
echo PrettyConsole::return248("PrettyConsole::return248") . "\n";

// short calls, onXX is not required
PrettyConsole::puts248("PrettyConsole::puts248");

// If no other class exists with the name of Pretty, you can use the shortcut
Pretty::puts2("Pretty::puts2");
echo Pretty::return2("Pretty::return2") . "\n";

Console Color Hex Chart