Set the group brightness.

        :param brightness: Brightness in decimal percent (0.0-1.0).
773778
def brightness(self, brightness):
        
        if brightness < 0 or brightness > 1:
            raise ValueError("Brightness must be a percentage "
                             "represented as decimal 0-1.0")
        self._brightness = brightness
        cmd = self.command_set.brightness(brightness)
        self.send(cmd)
117336
def set_brightness(self, brightness, duration=0, rapid=False):
        
        color = self.get_color()
        color2 = (color[0], color[1], brightness, color[3])
        try:
            if rapid:
                self.fire_and_forget(LightSetColor, {"color": color2, "duration": duration}, num_repeats=1)
            else:
                self.req_with_ack(LightSetColor, {"color": color2, "duration": duration})
        except WorkflowException as e:
            raise
428130
def brightness_to_hex(self, level):
        """"""
        level_int = int(level)
        new_int = int((level_int * 255)/100)
        new_level = format(new_int, '02X')
        self.logger.debug("brightness_to_hex: %s to %s", level, str(new_level))
        return str(new_level)
714990
def set_level(self, val):
        """"""
        if val == 0:
            self.off()
        else:
            setlevel = 255
            if val < 1:
                setlevel = val * 100
            elif val <= 0xff:
                setlevel = val
            set_command = StandardSend(
                self._address, COMMAND_LIGHT_ON_0X11_NONE, cmd2=setlevel)
            self._send_method(set_command, self._on_message_received)
1258763
public void setGamma(javax.el.ValueExpression _gamma) {
		getStateHelper().put(PropertyKeys.gamma, _gamma);
	}
80026
def max_brightness(self):
        
        self._max_brightness, value = self.get_cached_attr_int(self._max_brightness, 'max_brightness')
        return value
1145083
def _dimmest(self):
        
        for _ in range(steps(self.brightness, 0.0,
                             self.command_set.brightness_steps)):
            self._dimmer()
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)
1311834
def brightness(self, brightness):
        
        try:
            cmd = self.command_set.brightness(brightness)
            self.send(cmd)
            self._brightness = brightness
        except AttributeError:
            self._setter('_brightness', brightness,
                         self._dimmest, self._brightest,
                         self._to_brightness)
23839
def set_group_type(self, group, bulb_type):
        
        if bulb_type not in ("rgbw", "white"):
            raise AttributeError("Bulb type must be either rgbw or white")

        self.group[group] = bulb_type
        self.has_white = "white" in self.group.values()
        self.has_rgbw = "rgbw" in self.group.values()
883748
public void setLightSpecular(int i, Color color) {
		float[] tmpColor = {
		    (float)color.getRed(),
		    (float)color.getGreen(),
		    (float)color.getBlue(),
		    (float)color.getAlpha()
		};
		gl.glLightfv(GL2.GL_LIGHT0 + i, GL2.GL_SPECULAR, tmpColor, 0);
	}
419518
def text_color(threshold=0.6, formula=:standard)
      brightness(formula) > threshold ? Colorist::Color.new(0x000000) : Colorist::Color.new(0xffffff)
    end
1148005
def _set_LED(self, status):
        
        # DIO pin 1 (LED), active low
        self.hw.remote_at(
            dest_addr=self.remote_addr,
            command='D1',
            parameter='\x04' if status else '\x05')
1196435
function calculateLuminance(hex, lum) {
  return Math.round(Math.min(Math.max(0, hex + (hex * lum)), 255));
}
658190
def hex_is_dark(hexx, percent=50):
    
    r, g, b = hex_to_rgb(hexx)
    luma = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 2.55  # per ITU-R BT.709

    return (luma < percent)
1326083
function setBrightnessOfLed(callback) {
    var ledIndex = 8;
    
    var setBrightnessOfLedInterval = setInterval(function() {
        if (ledIndex >= 0) {
            dot3k.barGraph.setBrightnessOfLed(ledIndex, 0);
            
            ledIndex--;
        } else {
            clearInterval(setBrightnessOfLedInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 500);
}
989224
def _brightness(x, change:uniform):
    ""
    return x.add_(scipy.special.logit(change))