Sets the custom background paint that will be used instead of
the predefined backgroundcolors like DARK_GRAY, BEIGE etc.
@param CUSTOM_BACKGROUND
971885
public void setCustomBackground(final Paint CUSTOM_BACKGROUND) {
        model.setCustomBackground(CUSTOM_BACKGROUND);
        if (model.getBackgroundColor() == BackgroundColor.CUSTOM) {
            reInitialize();
        }
    }
1042671
def set_palette(self, background, foreground):
        
        palette = QPalette()
        palette.setColor(QPalette.Base, background)
        palette.setColor(QPalette.Text, foreground)
        self.setPalette(palette)

        # Set the right background color when changing color schemes
        # or creating new Editor windows. This seems to be a Qt bug.
        # Fixes Issue 2028 and 8069
        if self.objectName():
            style = "QPlainTextEdit#%s {background: %s; color: %s;}" % \
                    (self.objectName(), background.name(), foreground.name())
            self.setStyleSheet(style)
896428
public static void setBackground(View v, @DrawableRes int drawableRes) {
        ViewCompat.setBackground(v, ContextCompat.getDrawable(v.getContext(), drawableRes));
    }
289185
protected void paintBackground (Graphics g)
    {
        // simply fill our background color
        g.setColor(getBackground());
        g.fillRect(0, 0, getWidth(), getHeight());
    }
1363374
private void initializePainters() {
        mClockwiseReachedArcPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mClockwiseReachedArcPaint.setColor(mClockwiseArcColor);
        mClockwiseReachedArcPaint.setAntiAlias(true);
        mClockwiseReachedArcPaint.setStrokeWidth(mClockwiseReachedArcWidth);
        mClockwiseReachedArcPaint.setStyle(Paint.Style.STROKE);

        mCounterClockwiseReachedArcPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mCounterClockwiseReachedArcPaint.setColor(mCounterClockwiseArcColor);
        mCounterClockwiseReachedArcPaint.setAntiAlias(true);
        mCounterClockwiseReachedArcPaint.setStrokeWidth(mCounterClockwiseReachedArcWidth);
        mCounterClockwiseReachedArcPaint.setStyle(Paint.Style.STROKE);

        mClockwiseOutlineArcPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mClockwiseOutlineArcPaint.setColor(mClockwiseOutlineArcColor);
        mClockwiseOutlineArcPaint.setAntiAlias(true);
        mClockwiseOutlineArcPaint.setStrokeWidth(mClockwiseOutlineArcWidth);
        mClockwiseOutlineArcPaint.setStyle(Paint.Style.STROKE);

        mCounterClockwiseOutlineArcPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mCounterClockwiseOutlineArcPaint.setColor(mCounterClockwiseOutlineArcColor);
        mCounterClockwiseOutlineArcPaint.setAntiAlias(true);
        mCounterClockwiseOutlineArcPaint.setStrokeWidth(mCounterClockwiseOutlineArcWidth);
        mCounterClockwiseOutlineArcPaint.setStyle(Paint.Style.STROKE);

        mCircleFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mCircleFillPaint.setColor(mCircleFillColor);
        mCircleFillPaint.setAntiAlias(true);
        mCircleFillPaint.setStyle(Paint.Style.FILL);

        //Defaults
        mReachedArcPaint = mClockwiseReachedArcPaint;
        mOutlineArcPaint = mClockwiseOutlineArcPaint;
    }
360766
public final void setDialogBackground(@DrawableRes final int resourceId) {
        this.dialogBackground = ContextCompat.getDrawable(getContext(), resourceId);
        this.dialogBackgroundBitmap = null;
        this.dialogBackgroundId = resourceId;
        this.dialogBackgroundColor = -1;
    }
1155768
public function setBackgroundColor(\Jdenticon\Color $color)
    {
        parent::setBackgroundColor($color);
        $this->canvas->backColor = $this->backgroundColor->toRgba();
    }
1074880
public function setBackgroundColor($backgroundColor)
    {
        if (null === $backgroundColor) {
            return $this;
        }

        $this->backgroundColor = $this->convertColor($backgroundColor);

        return $this;
    }
718081
@NonNull
  @SuppressWarnings("WeakerAccess")
  public SnackbarWrapper setBackgroundColorRes(@ColorRes int color) {
    getView().setBackgroundColor(ContextCompat.getColor(context, color));
    return this;
  }
1297286
@Deprecated
    @SuppressLint("NewApi")
    public static void setBackground(View v, Drawable d) {
        ViewCompat.setBackground(v, d);
    }
1227837
public final void setDialogBackground(@Nullable final Bitmap background) {
        this.dialogBackground = new BitmapDrawable(getContext().getResources(), background);
        this.dialogBackgroundBitmap = background;
        this.dialogBackgroundId = -1;
        this.dialogBackgroundColor = -1;
    }
711897
private void obtainBackgroundColor(final int theme) {
        TypedArray typedArray = getContext().getTheme()
                .obtainStyledAttributes(theme, new int[]{R.attr.colorPrimary});
        int colorPrimary = typedArray.getColor(0, 0);
        typedArray.recycle();

        if (colorPrimary != 0) {
            backgroundView.setBackgroundColor(colorPrimary);
        }
    }
603434
public void setCustomLedColor(final Color COLOR) {
        model.setCustomLedColor(new CustomLedColor(COLOR));
        final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false;

        switch (getOrientation()) {
            case HORIZONTAL:
                recreateLedImages(getHeight());
                break;
            case VERTICAL:
                recreateLedImages(getWidth());
                break;
            default:
                recreateLedImages();
                break;
        }

        if (currentLedImage != null) {
            currentLedImage.flush();
        }
        currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff;

        repaint(getInnerBounds());
    }
798352
public final void setDialogHeaderBackgroundColor(@ColorInt final int color) {
        this.dialogHeaderBackground = new ColorDrawable(color);
        this.dialogHeaderBackgroundBitmap = null;
        this.dialogHeaderBackgroundId = -1;
        this.dialogHeaderBackgroundColor = color;
    }
889032
private void applyBackgroundColor(JRDesignCellContents contents, DJCrosstabRow crosstabRow,
			DJCrosstabColumn crosstabColumn, int i,int j) {

		Color color = colors[i][j];

		contents.setBackcolor(color);
	}
106825
public JFreeChartRender setBackgroundPaint(Color color) {
        chart.setBackgroundPaint(color);
        getPlot().setBackgroundPaint(color);
        return this;
    }
1104573
public static void setColorsThumb(TextView initialsView, int backgroundColor, int strokeColor) {
        GradientDrawable drawable = (GradientDrawable) initialsView.getResources().getDrawable(R.drawable.boxsdk_thumb_background);
        drawable.setColorFilter(backgroundColor, PorterDuff.Mode.MULTIPLY);
        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
            drawable.setStroke(3, strokeColor);
            initialsView.setBackground(drawable);
        } else {
            drawable.setStroke(3, strokeColor);
            initialsView.setBackgroundDrawable(drawable);
        }
    }