Here you can find the source of blendColors(Color color, Color color1, double d)
public static Color blendColors(Color color, Color color1, double d)
//package com.java2s; //License from project: Open Source License import java.awt.*; public class Main { public static Color blendColors(Color color, Color color1, double d) { if (color == null || color1 == null) { return null; } else {/*from ww w . j a v a 2 s . c o m*/ int i = (int) ((double) color1.getRed() * d + (double) color.getRed() * (1.0D - d)); int j = (int) ((double) color1.getGreen() * d + (double) color.getGreen() * (1.0D - d)); int k = (int) ((double) color1.getBlue() * d + (double) color.getBlue() * (1.0D - d)); int l = color.getAlpha(); return new Color(i, j, k, l); } } }