Set a range of the colormap, interpolating between two colors.
@param firstIndex the position of the first color
@param lastIndex the position of the second color
@param color1 the first color
@param color2 the second color
480595
public void setColorRange(int firstIndex, int lastIndex, int color1, int color2) {
		for (int i = firstIndex; i <= lastIndex; i++)
			map[i] = ImageMath.mixColors((float)(i-firstIndex)/(lastIndex-firstIndex), color1, color2);
	}
1085377
public void mergedRegion(int firstRow, int lastRow, int firstCol, int lastCol) {
        mergedRegion(workbook.getSheetAt(sheetIndex), firstRow, lastRow, firstCol, lastCol);
    }
1246557
public void setRange(int indices[]) {
        this.currentVal = Arrays.toString(indices); 								// "[1,2,3]"
		this.currentVal = this.currentVal.substring(1,this.currentVal.length()-1);	// "1,2,3"
    }
18583
@Override
  final protected void addRangeEmpty(int left, int right) {
    String key = left + "_" + right;
    if (index.containsKey(key)) {
      // do nothing (empty...)
    } else {
      root = addRange(root, left, right, null);
      root.color = IntervalRBTreeNode.BLACK;
    }
  }
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);
	}
860755
public void setTextColor(final Color COLOR) {
        if (null == textColor) {
            _textColor = COLOR;
            redraw();
        } else {
            textColor.set(COLOR);
        }
    }
796420
public void setColor(int n, int color) {
		int firstColor = map[0];
		int lastColor = map[256-1];
		if (n > 0)
			for (int i = 0; i < n; i++)
				map[i] = ImageMath.mixColors((float)i/n, firstColor, color);
		if (n < 256-1)
			for (int i = n; i < 256; i++)
				map[i] = ImageMath.mixColors((float)(i-n)/(256-n), color, lastColor);
	}
426651
public void setPrimaryColor(ColorUIResource primary)
    {
        primaryColor3 = primary;
        primaryColor2 = CustomTheme.darken(primaryColor3);
        primaryColor1 = CustomTheme.darken(primaryColor2);
    }
325952
public void setColor(final Color COLOR) {
        if (null == color) {
            _color = COLOR;
        } else {
            color.set(COLOR);
        }
        fireMarkerEvent(COLOR_CHANGED_EVENT);
    }
209044
public void setThresholdColor(final Color COLOR) {
        if (null == thresholdColor) {
            _thresholdColor = COLOR;
            fireTileEvent(REDRAW_EVENT);
        } else {
            thresholdColor.set(COLOR);
        }
    }
193709
public DesignSpec setSpacingsColor(int color) {
        if (mSpacingsPaint.getColor() == color) {
            return this;
        }

        mSpacingsPaint.setColor(color);
        invalidateSelf();

        return this;
    }
230136
public void setColor(int color) {
        if (mState.mBaseColor != color || mState.mUseColor != color) {
            invalidateSelf();
            mState.mBaseColor = mState.mUseColor = color;
        }
    }
631630
public static MappeableContainer rangeOfOnes(final int start, final int last) {
    final int arrayContainerOverRunThreshold = 2;
    final int cardinality = last - start;

    if (cardinality <= arrayContainerOverRunThreshold) {
      return new MappeableArrayContainer(start, last);
    }
    return new MappeableRunContainer(start, last);
  }
66080
def get_color_between(color1, color2, i):
    
    if i <= 0:
        return color1
    if i >= 1:
        return color2
    return (int(color1[0] + (color2[0] - color1[0]) * i),
            int(color1[1] + (color2[1] - color1[1]) * i),
            int(color1[2] + (color2[2] - color1[2]) * i))
1134792
public JFreeChartRender setGridPaint(Color color) {
        getPlot().setRangeGridlinePaint(color);
        getPlot().setDomainGridlinePaint(color);
        return this;
    }
126558
public void setGradationColor(GradationMode2D mode, ColorSet colorSet1, ColorSet colorSet2) {
        setGradationColor(mode, new RGBColor(colorSet1), new RGBColor(colorSet2));
    }
1336243
@SuppressWarnings("nls")
    public void createDefaultColorTable( double[] dataRange ) {
        int[][] rainbow = PredefinedColorRules.rainbow;
        ArrayList<String> rules = new ArrayList<String>();

        // calculate the color increment
        float rinc = (float) (dataRange[1] - dataRange[0]) / 5;
        for( int i = 0; i < 4; i++ ) {
            addColorRule((float) (dataRange[0] + (i * rinc)), rainbow[i][0], rainbow[i][1], rainbow[i][2],
                    (float) (dataRange[0] + ((i + 1) * rinc)), rainbow[i + 1][0], rainbow[i + 1][1], rainbow[i + 1][2]);

            StringBuffer rule = new StringBuffer();
            rule.append((dataRange[0] + (i * rinc)) + ":");
            rule.append(rainbow[i][0] + ":" + rainbow[i][1] + ":" + rainbow[i][2] + " ");
            rule.append((dataRange[0] + ((i + 1) * rinc)) + ":");
            rule.append(rainbow[i + 1][0] + ":" + rainbow[i + 1][1] + ":" + rainbow[i + 1][2] + " ");
            rules.add(rule.toString());
        }

        addColorRule((float) (dataRange[1] - rinc), rainbow[4][0], rainbow[4][1], rainbow[4][2], (float) (dataRange[1]),
                rainbow[5][0], rainbow[5][1], rainbow[5][2]);
        StringBuffer rule = new StringBuffer();
        rule.append((dataRange[1] - rinc) + ":");
        rule.append(rainbow[4][0] + ":" + rainbow[4][1] + ":" + rainbow[4][2] + " ");
        rule.append((dataRange[1]) + ":");
        rule.append(rainbow[5][0] + ":" + rainbow[5][1] + ":" + rainbow[5][2] + " ");
        rules.add(rule.toString());

        if (!colrFile.exists()) {
            BufferedWriter bw = null;
            try {
                // check also existence of colr folder, it could be missing
                File colFolder = colrFile.getParentFile();
                if (!colFolder.exists()) {
                    colFolder.mkdirs();
                }
                bw = new BufferedWriter(new FileWriter(colrFile));
                String header = "% " + dataRange[0] + "   " + dataRange[1] + "   255";
                bw.write(header + "\n");
                for( String string : rules ) {
                    bw.write(string + "\n");
                }
                bw.close();
            } catch (IOException e1) {
                e1.printStackTrace();
            }
        }

    }