Here you can find the source of lighter(Color c, boolean transparant)
public static Color lighter(Color c, boolean transparant)
//package com.java2s; //License from project: Open Source License import java.awt.Color; public class Main { public static Color lighter(Color c, boolean transparant) { double org = 0.6; double white = 0.4; if (!transparant) return new Color((int) (c.getRed() * org + 0xff * white), (int) (c.getGreen() * org + 0xff * white), (int) (c.getBlue() * org + 0xff * white)); else// ww w .j a v a 2 s . c o m return new Color((int) (c.getRed() * org + 0xff * white), (int) (c.getGreen() * org + 0xff * white), (int) (c.getBlue() * org + 0xff * white), (int) (0.8 * 0xff)); } }