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