Here you can find the source of lighter(Color c)
public static Color lighter(Color c)
//package com.java2s; /*/* w w w. ja v a 2s. com*/ * This software copyright by various authors including the RPTools.net * development team, and licensed under the LGPL Version 3 or, at your option, * any later version. * * Portions of this software were originally covered under the Apache Software * License, Version 1.1 or Version 2.0. * * See the file LICENSE elsewhere in this distribution for license details. */ import java.awt.Color; public class Main { /** * @return a lighter color, as opposed to a brighter color as in * Color.brighter(). This prevents light colors from getting * bleached out. */ public static Color lighter(Color c) { if (c == null) return null; else { int r = c.getRed(); int g = c.getGreen(); int b = c.getBlue(); r += 64 * (255 - r) / 255; g += 64 * (255 - g) / 255; b += 64 * (255 - b) / 255; return new Color(r, g, b); } } }