A simple PHP interface providing convenient access to ANSI colours
Since this "package" is so simple, it's intended that you simply copy the interface file to your setup. You can do that by copying the included ANSI.php file, which is also available as a Gist, and possibly updating the namespace to suit your needs.
You can also simply copy the code below:
interface ANSI {
const BLACK = "\033[30m";
const RED = "\033[31m";
const GREEN = "\033[32m";
const YELLOW = "\033[33m";
const BLUE = "\033[34m";
const MAGENTA = "\033[35m";
const CYAN = "\033[36m";
const WHITE = "\033[37m";
const RESET = "\033[0m";
}The interface provides constants for the ANSI colour codes. You can use them like this:
echo ANSI::RED . 'This is red' . ANSI::RESET;This package is licensed under the MIT license. See the LICENSE file for more information.
