Returns a new TwoColors object with each color disabled using
{@link disable(Color)}.

@param  colors the original colors.

@return the new colors.
180481
protected TwoColors disable(TwoColors colors) {
        return new TwoColors(disable(colors.top), disable(colors.bottom));
    }
62355
@NonNull
    public IconicsDrawable backgroundColor(@NonNull ColorStateList colors) {
        if (colors != null) {
            boolean isInvalidate = false;

            if (mRoundedCornerRx == -1) {
                mRoundedCornerRx = 0;
                isInvalidate = true;
            }
            if (mRoundedCornerRy == -1) {
                mRoundedCornerRy = 0;
                isInvalidate = true;
            }

            mBackgroundBrush.setColors(colors);
            if (mBackgroundBrush.applyState(getState())) {
                isInvalidate = true;
            }

            if (isInvalidate) {
                invalidateSelf();
            }
        }
        return this;
    }
910020
public static Color slightlyDarker(final Color color) {
        return new Color(Math.max((int) (color.getRed() * COLOR_SCALE_FACTOR), 0),
                Math.max((int) (color.getGreen() * COLOR_SCALE_FACTOR), 0),
                Math.max((int) (color.getBlue() * COLOR_SCALE_FACTOR), 0));
    }
412188
private double doubleValue2Colors( double left, double right ) {
        return rgba( doubleValue( red( left ), red( right ) ), //
                        doubleValue( green( left ), green( right ) ), //
                        doubleValue( blue( left ), blue( right ) ), 1 );
    }
350219
@Override
	public Color put(Double position, Color color) {
		if( position == null ) {
			throw new NullPointerException("Null endpoint position");
		}
		if( color == null ){
			throw new NullPointerException("Null colors are not allowed.");
		}
		return mapping.put(position, color);
	}
33344
protected TwoColors desaturate(TwoColors colors) {
        return new TwoColors(desaturate(colors.top), desaturate(colors.bottom));
    }
245333
public static Palette createPalette(final Color color, final Color... colors) {
        Color[] cs = new Color[colors.length + 1];
        cs[0] = color;
        System.arraycopy(colors, 0, cs, 1, colors.length);
        return new FixedPalette(cs);
    }
535416
public void colorChannel(String channel, Color color){
    if(this.channelColors == null){
      this.channelColors = new HashMap<String,Color>();
    }
    this.channelColors.put(channel.toLowerCase(),color);
  }
272196
public static RGBColor rgb(int r, int g, int b) {
    return new RGBColor(makeRgb(r, g, b));
  }
758395
function(color1, color2) {
		var result = color1.slice();
		for (var i=0;i<3;i++) {
			for (var j=1;j<arguments.length;j++) {
				result[i] += arguments[j][i];
			}
		}
		return result;
	}
578269
def disabledPenColor(self):
        
        palette = self.palette()
        return palette.color(palette.Disabled, palette.NodeForeground)
903240
@CheckReturnValue
    public RoleAction setColor(Color color)
    {
        return this.setColor(color != null ? color.getRGB() : null);
    }
242180
static public Color fromString (String rgb) {
		if (rgb == null || rgb.length() != 6) return Color.white;
		return new Color(Integer.parseInt(rgb.substring(0, 2), 16), Integer.parseInt(rgb.substring(2, 4), 16), Integer.parseInt(rgb
			.substring(4, 6), 16));
	}
952853
protected ColorStateList getTextColorStateList(@ColorInt int color, @ColorInt int selectedTextColor) {
        if (colorStateList == null || color + selectedTextColor != colorStateList.first) {
            colorStateList = new Pair<>(color + selectedTextColor, DrawerUIUtils.getTextColorStateList(color, selectedTextColor));
        }

        return colorStateList.second;
    }
350969
public final void setBackgroundColor(@ColorInt final int color) {
        this.background = new ColorDrawable(color);
        this.backgroundBitmap = null;
        this.backgroundId = -1;
        this.backgroundColor = color;
        adaptBackground();
    }
434830
def setDisabledAlternateColor(self, color):
        
        color = QColor(color)
        if self._palette is None:
            self._palette = XNodePalette(self._scenePalette)
        
        self._palette.setColor(self._palette.Disabled,
                               self._palette.NodeAlternateBackground,
                               color)
        self.setDirty()
861078
public SwipeBack setDividerAsShadowColor(int color) {
		GradientDrawable.Orientation orientation = getDividerOrientation();

		final int endColor = color & 0x00FFFFFF;
		GradientDrawable gradient = new GradientDrawable(orientation,
				new int[] {
				color,
				endColor,
		});

		setDivider(gradient);

		return this;
	}