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

@param string $backgroundColour Background colour to set.

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