Sets the current color mode for this console to the inputed value.
        
        :param      mode | <unicode>
515266
def setCurrentMode(self, mode):
        
        if type(mode) == int:
            mode = self.LoggingMap.get(mode, ('standard', ''))[0]
            
        if mode == self._currentMode:
            return
            
        self._currentMode = mode
        color = self.color(mode)
        if not color.isValid():
            return
            
        format = QtGui.QTextCharFormat()
        format.setForeground(color)
        self.setCurrentCharFormat(format)
200685
def cmd_mode(self, args):
        ''''''
        mode_mapping = self.master.mode_mapping()
        if mode_mapping is None:
            print('No mode mapping available')
            return
        if len(args) != 1:
            print('Available modes: ', mode_mapping.keys())
            return
        if args[0].isdigit():
            modenum = int(args[0])
        else:
            mode = args[0].upper()
            if mode not in mode_mapping:
                print('Unknown mode %s: ' % mode)
                return
            modenum = mode_mapping[mode]
        self.master.set_mode(modenum)
196003
def _raise_on_mode(self, mode):
        
        valid_modes = [
            'random_sample',
            'random_sample_per_pix',
            'samples',
            'median',
            'mean',
            'best',
            'percentile']

        if mode not in valid_modes:
            raise ValueError(
                '"{}" is not a valid `mode`. Valid modes are:\n'
                '  {}'.format(mode, valid_modes)
            )
92426
public void setMode(String mode) {
        checkNotNull(mode, "mode should not be null");
        if (MODE_ASYNC.equals(mode) || MODE_SYNC.equals(mode)) {
            this.mode = mode;
        } else {
            throw new IllegalArgumentException("illegal mode: " + mode);
        }
    }
485242
public void setEditMode(final EditMode mode) {

        if (!m_modeSelect.getValue().equals(mode)) {
            m_modeSelect.setValue(mode);
        }
    }
260163
def set_mode (filename, flags):
    """"""
    try:
        mode = os.lstat(filename).st_mode
    except OSError:
        # ignore
        return
    if not (mode & flags):
        try:
            os.chmod(filename, flags | mode)
        except OSError as msg:
            log_error("could not set mode flags for `%s': %s" % (filename, msg))
650422
def set_pin_mode(pin, mode)
      pins[pin].mode = mode
      write(PIN_MODE, pin, mode)
    end
648053
public void setMode(EditorMode mode) {

        switch (mode) {
            case galleries:
                m_newGalleryMenuButton.getElement().getStyle().clearDisplay();
                m_newMenuButton.getElement().getStyle().setDisplay(Display.NONE);
                break;
            case modelpages:
            case categories:
                m_newGalleryMenuButton.getElement().getStyle().setDisplay(Display.NONE);
                m_newMenuButton.getElement().getStyle().clearDisplay();
                break;
            default:
                m_newMenuButton.getElement().getStyle().clearDisplay();
                m_newGalleryMenuButton.getElement().getStyle().setDisplay(Display.NONE);
                break;
        }
    }
1016083
def setColor(self, color):
        ''''''
        if color == 'blue':
            self.color = 'blue'
            self.colorCode = self.colors['blue']
            self.colorCodeDark = self.colors['dblue']
        elif color == 'red':
            self.color = 'red'
            self.colorCode = self.colors['red']
            self.colorCodeDark = self.colors['dred']
        elif color == 'yellow':
            self.color = 'yellow'
            self.colorCode = self.colors['yellow']
            self.colorCodeDark = self.colors['dyellow']
        elif color == 'green':
            self.color = 'green'
            self.colorCode = self.colors['green']
            self.colorCodeDark = self.colors['dgreen']
        elif color == 'wild':  # No color modification
            self.wild = True
            self.color = 'wild'
            self.colorCodeDark = self.colors['dwild']
            self.colorCode = self.colors['wild']
983265
def setOverlayColor(self, ulOverlayHandle, fRed, fGreen, fBlue):
        """"""

        fn = self.function_table.setOverlayColor
        result = fn(ulOverlayHandle, fRed, fGreen, fBlue)
        return result
647644
@Nonnull
  public final IMPLTYPE setMode (@Nonnull final EHCScriptInlineMode eMode)
  {
    m_eScriptMode = ValueEnforcer.notNull (eMode, "Mode");
    return thisAsT ();
  }
1316927
private void doHighlight(String colorMode) throws WidgetException {
		if (!(getGUIDriver() instanceof HighlightProvider)) {
			return;
		}
		HighlightProvider highDriver = (HighlightProvider) getGUIDriver();

		if (highDriver.isHighlight()) {
			setBackgroundColor(highDriver.getHighlightColor(colorMode));
		}
	}
671206
def setColor( self, color ):
        
        self._color = QColor(color)
        self.setAlternateColor(self._color.lighter(140))
104730
def setmode(mode):
    
    if hasattr(mode, '__getitem__'):
        set_custom_pin_mappings(mode)
        mode = CUSTOM

    assert mode in [BCM, BOARD, SUNXI, CUSTOM]
    global _mode
    _mode = mode
809834
def set_mode_flag(self, flag, enable):
        '''
        
        '''
        if self.mavlink10():
            mode = self.base_mode
            if (enable == True):
                mode = mode | flag
            elif (enable == False):
                mode = mode & ~flag
            self.mav.command_long_send(self.target_system, self.target_component,
                                           mavlink.MAV_CMD_DO_SET_MODE, 0,
                                           mode,
                                           0, 0, 0, 0, 0, 0)
        else:
            print("Set mode flag not supported")
1048286
def text_color(self, value):
        

        if value is not None:
            assert type(value) in (Qt.GlobalColor, QColor), \
                "'{0}' attribute: '{1}' type is not 'int' or 'QColor'!".format("text_color", value)
        self.__text_color = value
1075036
def color(self, color):
        
        if color is None:
            color = 0xFFFFFFFF

        idc.SetColor(self.ea, idc.CIC_FUNC, color)