Here you can find the source of generateGreyColor(double value, double minValue, double maxValue)
public static Color generateGreyColor(double value, double minValue, double maxValue)
//package com.java2s; //License from project: Open Source License import java.awt.Color; public class Main { public static Color generateGreyColor(double value, double minValue, double maxValue) { int colorValue = (int) ((value + 1.0D) / 2.0D * 245.0D + 10.0D); colorValue = 255 - colorValue;//from ww w . j a va 2 s . c o m return new Color(colorValue, colorValue, colorValue); } }