src/PHPCoverFish/Common/CoverFishColor.php
public static function setColor($color, $string)
    {
        if (!isset(self::$colorTable[$color]))
        {
            throw new \Exception('ansi color is not defined');
        }

        return sprintf("\033[%sm%s\033[0m", self::$colorTable[$color], $string);
    }
public static function setColor($color, $string)
    {
        if (!isset(self::$colorTable[$color]))
        {
            throw new \Exception('ansi color is not defined');
        }

        return sprintf("\033[%sm%s\033[0m", self::$colorTable[$color], $string);
    }
public static function setColor ( $ color , $ string ) { if ( ! isset ( self :: $ colorTable [ $ color ] ) ) { throw new \ Exception ( 'ansi color is not defined' ) ; } return sprintf ( "\033[%sm%s\033[0m" , self :: $ colorTable [ $ color ] , $ string ) ; }
Make string appear in color

@param string $color
@param string $string

@return string
@throws \Exception
Make string appear in color