Mage/Console/Colors.php
/**
     * Parses a Text to represent Colors in the Terminal/Console.
     *
     * @param string $string
     * @return string
     */
Parses a Text to represent Colors in the Terminal/Console.
Parses a Text to represent Colors in the Terminal / Console .
public static function color($string)
    {
        foreach (self::$foregroundColors as $key => $code) {
            $replaceFrom = array(
                '<' . $key . '>',
            	'</' . $key . '>'
            );
            $replaceTo = array(
                "\033[" . $code . 'm',
                "\033[0m"
            );
            $string = str_replace($replaceFrom, $replaceTo, $string);
        }
        return $string;
    }
public static function color ( $ string ) { foreach ( self :: $ foregroundColors as $ key => $ code ) { $ replaceFrom = array ( '<' . $ key . '>' , '</' . $ key . '>' ) ; $ replaceTo = array ( " \033 [ " . $ code . 'm' , " \033 [0m " ) ; $ string = str_replace ( $ replaceFrom , $ replaceTo , $ string ) ; } return $ string ; }
Parses a Text to represent Colors in the Terminal/Console.
Parses a Text to represent Colors in the Terminal / Console .