public static function start_colour($fgColour = null, $bgColour = null, $bold = false)
    {
        if (!self::supports_colour()) {
            return "";
        }
        $colours = array(
            'black' => 0,
            'red' => 1,
            'green' => 2,
            'yellow' => 3,
            'blue' => 4,
            'magenta' => 5,
            'cyan' => 6,
            'white' => 7,
        );

        $prefix = "";

        if ($fgColour || $bold) {
            if (!$fgColour) {
                $fgColour = "white";
            }
            $prefix .= "\033[" . ($bold ? "1;" :"") . "3" . $colours[$fgColour] . "m";
        }


        if ($bgColour) {
            $prefix .= "\033[4" . $colours[$bgColour] . "m";
        }

        return $prefix;
    }