colorize console.log output code example
Example 1: how to color console.log
console.log('%c Oh my heavens! ', 'background: #222; color: #bada55');
Example 2: How to Color and Style the Console Output
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
// ...
$outputStyle = new OutputFormatterStyle('red', '#ff0', ['bold', 'blink']);
$output->getFormatter()->setStyle('fire', $outputStyle);
$output->writeln('<fire>foo</>');