Set the LED brightness for the current group/button.
354656
def set_led_brightness(self, brightness):
        """"""
        set_cmd = self._create_set_property_msg("_led_brightness", 0x07,
                                                brightness)
        self._send_method(set_cmd, self._property_set)
596348
def set_led(self, led, value):
        
        if led < 0 or led > 127:
            raise ValueError('LED must be value of 0 to 127.')
        # Calculate position in byte buffer and bit offset of desired LED.
        pos = led // 8
        offset = led % 8
        if not value:
            # Turn off the specified LED (set bit to zero).
            self.buffer[pos] &= ~(1 << offset)
        else:
            # Turn on the speciried LED (set bit to one).
            self.buffer[pos] |= (1 << offset)
1145083
def _dimmest(self):
        
        for _ in range(steps(self.brightness, 0.0,
                             self.command_set.brightness_steps)):
            self._dimmer()
1015461
public void setAmbientLight(int i, Color color, boolean enableColor) {
	    float ambient[] = {
            (float)color.getRed(),
            (float)color.getGreen(),
            (float)color.getBlue(),
            (float)color.getAlpha()
        };
		gl.glEnable(GL2.GL_LIGHTING);
		gl.glEnable(GL2.GL_LIGHT0 + i);
		if(enableColor)
		    gl.glLightfv(GL2.GL_LIGHT0 + i, GL2.GL_AMBIENT, ambient, 0);
	}
435823
public void setLedColor(final LedColor LED_COLOR) {
        if (ledColor == LED_COLOR) {return;}

        if (LED_COLOR == null) {
            ledColor = LedColor.RED_LED;
        } else {
            ledColor = LED_COLOR;
        }
        final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false;
        flushImages();
        ledImageOff = create_LED_Image(getWidth(), 0, LED_COLOR, ledType);
        ledImageOn  = create_LED_Image(getWidth(), 1, LED_COLOR, ledType);

        currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff;

        repaint();
    }
1109621
def set_led(self, led_id, color):
        
        if not set_leds_color(self.corsair_sdk, LedColor(led_id, *color)):
            self._raise_corsair_error()
        return True
611616
def brighten(self):
        """"""
        brighten_command = StandardSend(
            self._address, COMMAND_LIGHT_BRIGHTEN_ONE_STEP_0X15_0X00)
        self._send_method(brighten_command)
123283
def set(self, is_on=None, brightness=None, cancel_transition=True):
        
        if cancel_transition:
            self._cancel_active_transition()

        if is_on is not None:
            self._is_on = is_on

        if brightness is not None:
            self._assert_is_brightness(brightness)
            self._brightness = brightness

        self._update_pwm()
1257974
def set_led(self, state):        
        """"""
        if self.connected:            
            reports = self.device.find_output_reports()
            for report in reports:
                if self.led_usage in report:
                    report[self.led_usage] = state
                    report.send()
472429
def set_brightness(self, brightness):
        """"""
        brightness = min([1.0, max([brightness, 0.0])]) # enforces range 0 ... 1
        self.state.brightness = brightness
        self._repeat_last_frame()
        sequence_number = self.zmq_publisher.publish_brightness(brightness)
        logging.debug("Set brightness to {brightPercent:05.1f}%".format(brightPercent=brightness*100))
        return (True, sequence_number, "OK")
989224
def _brightness(x, change:uniform):
    ""
    return x.add_(scipy.special.logit(change))
1097073
def dark(cls):
        ""
        wAttributes = cls._get_text_attributes()
        wAttributes &= ~win32.FOREGROUND_INTENSITY
        cls._set_text_attributes(wAttributes)
625899
def set_night_light_brightness(self, brightness=200):
        """"""
        self.publish(
            action='set',
            resource='cameras/{}'.format(self.device_id),
            publish_response=False,
            properties={'nightLight': {'brightness': brightness}}
        )
85976
def set_dimmer(self, dimmer):
        """"""
        command = {
            ATTR_START_ACTION: {
                    ATTR_DEVICE_STATE: self.state,
                    ROOT_START_ACTION: [{
                        ATTR_ID: self.raw[ATTR_ID],
                        ATTR_LIGHT_DIMMER: dimmer,
                        ATTR_TRANSITION_TIME: self.raw[ATTR_TRANSITION_TIME]
                    }, self.devices_dict]
                }
            }
        return self.set_values(command)
77998
def set_led(self, red=0, green=0, blue=0):
        """"""
        self._led = (red, green, blue)
        self._control()
166379
def to_red(self, on: bool=False):
        
        self._on = on
        if on:
            self._load_new(led_red_on)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>', lambda x: self.to_red(False))
        else:
            self._load_new(led_red)

            if self._toggle_on_click:
                self._canvas.bind('<Button-1>', lambda x: self.to_red(True))
54019
def set_brightness(self, brightness):
        
        if not 25 <= brightness <= 255:
            raise ValueError("The brightness needs to be between 25 and 255.")

        payload = self.generate_payload(SET, {self.DPS_INDEX_BRIGHTNESS: brightness})
        data = self._send_receive(payload)
        return data