PHP: ANSI color sequences for the CLI

I was doing some CLI work and needed the ANSI color sequence for PHP. So I don't have too look it up again here it is.

$green = "\033[38;5;2m";
$reset = "\033[0m";

print $green . "Green" . $reset . " not green";

Change the 2 in $green to whatever color is appropriate.



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.143.9.115
To prevent spam please submit by clicking the kitten: