public static function getForegroundCode($foregroundColour)
    {
        if (!isset(self::$foreground_colours[$foregroundColour])) {
            throw new \Exception('Invalid foreground colour.');
        }
        return "\033[" . self::$foreground_colours[$foregroundColour] . 'm';
    }
public static function getForegroundCode($foregroundColour)
    {
        if (!isset(self::$foreground_colours[$foregroundColour])) {
            throw new \Exception('Invalid foreground colour.');
        }
        return "\033[" . self::$foreground_colours[$foregroundColour] . 'm';
    }
public static function getForegroundCode ( $ foregroundColour ) { if ( ! isset ( self :: $ foreground_colours [ $ foregroundColour ] ) ) { throw new \ Exception ( 'Invalid foreground colour.' ) ; } return "\033[" . self :: $ foreground_colours [ $ foregroundColour ] . 'm' ; }
Returns the code for a foreground colour.

@param string $foregroundColour Foreground colour to set.

@return string Foreground colour code.
@throws \Exception if the colour code is invalid.
Returns the code for a foreground colour .