Here you can find the source of lighter(Color clr)
public static Color lighter(Color clr)
//package com.java2s; //License from project: Open Source License import java.awt.Color; public class Main { public static Color lighter(Color clr) { float[] hsb = new float[3]; Color.RGBtoHSB(clr.getRed(), clr.getGreen(), clr.getBlue(), hsb); hsb[1] *= 0.4;/*from www . j a va2 s .c om*/ return Color.getHSBColor(hsb[0], hsb[1], hsb[2]); } public static Color lighter(Color clr, double saturationFraction) { float[] hsb = new float[3]; Color.RGBtoHSB(clr.getRed(), clr.getGreen(), clr.getBlue(), hsb); hsb[1] *= saturationFraction; return Color.getHSBColor(hsb[0], hsb[1], hsb[2]); } }