src/helpers/Line.php
protected function colorize($color, $bold = 0)
    {
        if (!isset(self::$colors[$color])) {
            throw new Exception("Unknown color '$color'.");
        }

        $code = self::$colors[$color];
        $this->content .= "\033[{$bold};{$code}m";
    }
protected function colorize($color, $bold = 0)
    {
        if (!isset(self::$colors[$color])) {
            throw new Exception("Unknown color '$color'.");
        }

        $code = self::$colors[$color];
        $this->content .= "\033[{$bold};{$code}m";
    }
protected function colorize ( $ color , $ bold = 0 ) { if ( ! isset ( self :: $ colors [ $ color ] ) ) { throw new Exception ( "Unknown color '$color'." ) ; } $ code = self :: $ colors [ $ color ] ; $ this -> content .= "\033[{$bold};{$code}m" ; }
Adds a color code to this line.

@param int $color color code.
@param int $bold whether to use bold text.
@throws Exception if the color is invalid.
Adds a color code to this line .