Darken this color value by 0..1
@name darken
@memberOf me.Color
@function
@param {Number} scale
@return {me.Color} Reference to this object for method chaining
488452
function (scale) {
            scale = me.Math.clamp(scale, 0, 1);
            this.glArray[0] *= scale;
            this.glArray[1] *= scale;
            this.glArray[2] *= scale;

            return this;
        }
331496
function(color) {
            var normalizedColor = Splunk.util.normalizeColor(color);

            return (normalizedColor) ? parseInt(normalizedColor.replace("#", "0x"), 16) : 0;
        }
275697
function(fillColor) {
            var fillColorHex = this.colorUtils.hexFromColor(fillColor),
                luminanceThreshold = 128,
                darkColor = 'black',
                lightColor = 'white',
                fillLuminance = this.colorUtils.getLuminance(fillColorHex);

            return (fillLuminance < luminanceThreshold) ? lightColor : darkColor;
        }
590411
function (x0, y0, radius, start, end, color, c)
    {
        _c = c || _c
        if (color)
        {
            _c.fillStyle = color
        }
        x0 *= _scale
        y0 *= _scale
        radius *= _scale
        const interval = Math.PI / radius / 4
        for (let i = start; i <= end; i += interval)
        {
            put(x0 + Math.cos(i) * radius, y0 + Math.sin(i) * radius)
        }
    }
771854
function ( color ) {
            var colorObj = this.toRgb( color, true );
            return ( (colorObj.r * 299) + (colorObj.g * 587) + (colorObj.b * 114) ) / 1000;
        }
1095030
function(){
        var hsv = this.hsv;

        //hue is 0 - 360
        var h = Math.floor(hsv[0] * 360);
        //saturation & value/luminosity is 0-100 (%)
        var s = Math.floor(hsv[1] * 100);
        var v = Math.floor(hsv[2] * 100);
		return "hsl(" +h+ "," +s+ "%," +v+ "%)";
	}
680101
def scale(self, vmin=0., vmax=1.):
        
        return LinearColormap(
            self.colors,
            index=[vmin + (vmax-vmin)*(x-self.vmin)*1./(self.vmax-self.vmin) for x in self.index],  # noqa
            vmin=vmin,
            vmax=vmax,
            )
1001408
private int lighten(int color){
        float[] hsv = new float[3];
        Color.colorToHSV(color, hsv);
        hsv[2] = 1.0f - 0.8f * (1.0f - hsv[2]);
        color = Color.HSVToColor(hsv);
        return color;
    }
71258
def darken(self, amount):
        ''' 

        '''
        hsl = self.to_hsl()
        hsl.l = self.clamp(hsl.l - amount)
        return self.from_hsl(hsl)
1288555
def darken_color(hex_color, amount=0.4)
      hex_color = hex_color.gsub('#', '')
      rgb = hex_color.scan(/../).map { |color| color.hex }
      rgb[0] = (rgb[0].to_i * amount).round
      rgb[1] = (rgb[1].to_i * amount).round
      rgb[2] = (rgb[2].to_i * amount).round
      "#%02x%02x%02x" % rgb
    end
1001916
def on_transparency_value_changed(self, hscale):
        
        value = hscale.get_value()
        self.prefDlg.set_colors_from_settings()
        self.settings.styleBackground.set_int('transparency', MAX_TRANSPARENCY - int(value))
971810
function scale(progress) {
  var to = (this.options.to !== undefined) ? this.options.to : 1;
  var from = (this.options.from !== undefined) ? this.options.from : this.transforms.scale[0];
  var scale = (to - from) * progress + from;

  this.transforms.scale[0] = scale;
  this.transforms.scale[1] = scale;
}
1186362
public void scale(double scale) {
		this.m00 *= scale;
		this.m11 *= scale;
		this.m01 *= scale;
		this.m10 *= scale;
	}
213505
function Hue() {
        Channel.apply(this, arguments);
        this.dataType = NUMBER | HUE;
        this.cssType = NUMBER;
        this.range = [0, 360];
        this.filter = MOD;
        this.initial = 0;
    }
750124
function colorConvert( percentage, option, colorValue ) {
        var color    = require( 'color' );
        var newColor = color( colorValue.trim() );
        var newValue = '';

        switch ( option.trim() ) {
        case 'darken':
            newValue = newColor.darken( percentage ).hexString();
            break;

        case 'lighten':
            newValue = newColor.lighten( percentage ).hexString();
            break;

        case 'rgb':
            newValue = newColor.clearer( percentage ).rgbString();
            break;

        default:
            return '';
        }

        return newValue;
    }
823106
function setImageLuminanceColorScale( $imageObject, $filterData, $sourceMimeData, $destinationMimeData,
                                          $colorScale )
    {
        $white = ImageColorAllocate( $imageObject, 255, 255, 255 );
        $black = ImageColorAllocate( $imageObject, 0, 0, 0 );

        $rmod = $colorScale[0];
        $gmod = $colorScale[1];
        $bmod = $colorScale[2];

        $width = ImageSX( $imageObject );
        $height = ImageSY( $imageObject );
        for ( $y = 0; $y < $height; ++$y )
        {
            for ( $x = 0; $x < $width; ++$x )
            {
                $rgb = ImageColorAt( $imageObject, $x, $y );

                $r = ( $rgb >> 16 ) & 0xff;
                $g = ( $rgb >> 8 ) & 0x0ff;
                $b = ( $rgb ) & 0x0ff;

                $luminance = ( $r * 0.3 ) + ( $g * 0.59 ) + ( $b * 0.11 );

                $r = $luminance * $rmod;
                $g = $luminance * $gmod;
                $b = $luminance * $bmod;

                $color = ImageColorAllocate( $imageObject, $r, $g, $b );

                ImageSetPixel( $imageObject, $x, $y, $color );
            }
        }
        return $imageObject;
    }
793887
public static BigDecimal setScale(final BigDecimal bd, final Integer scale, final int rounding) {
        if (bd != null && scale != null) {
            return bd.setScale(scale, rounding);
        }
        return null;
    }