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));
    }