Here you can find the source of getGradientBrightColors(Color baseColor, float step, float max)
public static Color[] getGradientBrightColors(Color baseColor, float step, float max)
//package com.java2s; //License from project: Open Source License import java.awt.Color; import java.util.ArrayList; import java.util.List; public class Main { public static Color[] getGradientBrightColors(Color baseColor, float step, float max) { List<Color> list = new ArrayList<Color>(); float color[] = Color.RGBtoHSB(baseColor.getRed(), baseColor.getGreen(), baseColor.getBlue(), null); list.add(baseColor);/* ww w.ja v a 2s. c o m*/ for (; (color[2] += step) < (max);) { list.add(Color.getHSBColor(color[0], color[1], color[2])); } return list.toArray(new Color[] {}); } }