Make the current background color dark.
967451
def bk_dark(cls):
        ""
        wAttributes = cls._get_text_attributes()
        wAttributes &= ~win32.BACKGROUND_INTENSITY
        cls._set_text_attributes(wAttributes)
1238347
function updateCustomColor() {
                    switch (scope.val) {
                        case scope.ngTrueVal:
                            if (angular.isDefined(attrs.ngTrueColor)) {
                                scope.styleSwitch['background-color'] = attrs.ngTrueColor;
                            }
                            break;
                        case scope.ngFalseVal:
                            if (angular.isDefined(attrs.ngFalseColor)) {
                                scope.styleSwitch['background-color'] = attrs.ngFalseColor;
                            }
                            break;
                        default:
                            if (scope.triToggle) {
                                if (angular.isDefined(attrs.ngNullColor)) {
                                    scope.styleSwitch['background-color'] = attrs.ngNullColor;
                                }
                            }
                            break;
                    }
                }
574125
function adjustLuminance(rgb, lum) {
  var newRgb = {};
  newRgb.red = calculateLuminance(rgb.red, lum);
  newRgb.green = calculateLuminance(rgb.green, lum);
  newRgb.blue = calculateLuminance(rgb.blue, lum);

  return newRgb;
}
816926
protected void loadBackground()
    {
        CSSProperty.BackgroundColor bg = style.getProperty("background-color");
        if (bg == CSSProperty.BackgroundColor.color)
        {
            TermColor bgc = style.getSpecifiedValue(TermColor.class, "background-color");
            if (bgc.isTransparent())
                bgcolor = null;
            else
                bgcolor = CSSUnits.convertColor(bgc.getValue());
        }
        else
            bgcolor = null;

        bgimages = loadBackgroundImages(style);
    }
888969
def foreground_color(background_color)
      if color = (Color::RGB.from_html(background_color) rescue false) || color = Color::CSS[background_color]
        color.brightness > 0.5 ? "black" : "white"
      else
        "black"
      end
    end
408088
function clearBackground() {
  var body = document.body;
  if (body.style) {
    body.style.backgroundColor = 'rgba(0,0,0,0.01)';
    body.style.backgroundImage = '';
    setTimeout(function() {
      body.style.backgroundColor = 'transparent';
    }, 1);
    if (body.parentNode && body.parentNode.style) {
      body.parentNode.style.backgroundColor = 'transparent';
      body.parentNode.style.backgroundImage = '';
    }
  }
}
705031
function brighten(alpha) {
		if (isNumber(alpha) && alpha !== 0) {
			var i;
			for (i = 0; i < 3; i++) {
				rgba[i] += pInt(alpha * 255);

				if (rgba[i] < 0) {
					rgba[i] = 0;
				}
				if (rgba[i] > 255) {
					rgba[i] = 255;
				}
			}
		}
		return this;
	}
1058302
def bk_yellow(cls):
        ""
        wAttributes = cls._get_text_attributes()
        wAttributes &= ~win32.BACKGROUND_MASK
        wAttributes |=  win32.BACKGROUND_YELLOW
        cls._set_text_attributes(wAttributes)
706385
def _change_sel_color(self, event):
        """"""
        (r, g, b), (h, s, v), color = self.square.get()
        self.red.set(r)
        self.green.set(g)
        self.blue.set(b)
        self.saturation.set(s)
        self.value.set(v)
        self.hexa.delete(0, "end")
        self.hexa.insert(0, color.upper())
        if self.alpha_channel:
            self.alphabar.set_color((r, g, b))
            self.hexa.insert('end',
                             ("%2.2x" % self.alpha.get()).upper())
        self._update_preview()
813171
def lighten_color(color, amount):
    """"""
    color = [int(col + (255 - col) * amount) for col in hex_to_rgb(color)]
    return rgb_to_hex(color)
276012
def set_border(self, thickness, color="black"):
        
        self._set_tk_config("highlightthickness", thickness)
        self._set_tk_config("highlightbackground", utils.convert_color(color))
467408
void changeBackgroundAlpha() {
    Drawable background = getBackground();
    if (background != null) {
      int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset()));
      background.setAlpha(newAlpha);
    }
  }
746229
def foreground(color):
	""""""
	if color not in foreground_colors:
		return

	if is_win32:
		last_fg = foreground_colors[color][1]
		set_color_win32(last_fg | last_bg)
	else:
		set_color_ansi(foreground_colors[color][0])
570434
function(ui, context)
              {
                var hex = ui.val('hex');
                currentPreview.css({ backgroundColor: hex && '#' + hex || 'transparent' });
                setAlpha.call($this, currentPreview, Math.precision(((ui.val('a') || 0) * 100) / 255, 4));
              }
1151878
def _set_color(self, context, r, g, b, a):
        """"""
        if a < 1:
            context.set_source_rgba(r, g, b, a)
        else:
            context.set_source_rgb(r, g, b)
1220904
def _update_stylesheet(self, widget):
        """"""
        if is_dark_interface():
            css = qdarkstyle.load_stylesheet_from_environment()
            widget.setStyleSheet(css)
            palette = widget.palette()
            background = palette.color(palette.Window).lighter(150).name()
            border = palette.color(palette.Window).lighter(200).name()
            name = widget.__class__.__name__
            widget.setObjectName(name)
            extra_css = '''
                {0}#{0} {{
                    background-color:{1};
                    border: 1px solid {2};
                }}'''.format(name, background, border)
            widget.setStyleSheet(css + extra_css)
713372
function() {
        var s = this.el.style;
        s.display = "none";
        s.opacity = 1;
        s.filter = "alpha(opacity=100)";
        this.callback();
    }