public static function text($text, $fgColour = null, $bgColour = null, $bold = false)
    {
        if (!self::supports_colour()) {
            return $text;
        }

        if ($fgColour || $bgColour || $bold) {
            $prefix = self::start_colour($fgColour, $bgColour, $bold);
            $suffix = self::end_colour();
        } else {
            $prefix = $suffix = "";
        }

        return $prefix . $text . $suffix;
    }