public static function getFgColorString($colorCode)
    {
        list($color, $options) = self::extractColorAndOptions($colorCode);
        $codes = array_filter(array_merge($options, array("3{$color}")));
        return sprintf("\033[%sm", implode(';', $codes));
    }
public static function getFgColorString($colorCode)
    {
        list($color, $options) = self::extractColorAndOptions($colorCode);
        $codes = array_filter(array_merge($options, array("3{$color}")));
        return sprintf("\033[%sm", implode(';', $codes));
    }
public static function getFgColorString ( $ colorCode ) { list ( $ color , $ options ) = self :: extractColorAndOptions ( $ colorCode ) ; $ codes = array_filter ( array_merge ( $ options , array ( "3{$color}" ) ) ) ; return sprintf ( "\033[%sm" , implode ( ';' , $ codes ) ) ; }
Returns a foreground color string

@param int $color
@return string
Returns a foreground color string