Here you can find the source of brighter(Color c, double p)
public static Color brighter(Color c, double p)
//package com.java2s; /*//from ww w .j a v a 2 s. c o m * Copyright 2005 MH-Software-Entwicklung. All rights reserved. * Use is subject to license terms. */ import java.awt.*; public class Main { public static Color brighter(Color c, double p) { if (c == null) { return null; } double r = c.getRed(); double g = c.getGreen(); double b = c.getBlue(); double rd = 255.0 - r; double gd = 255.0 - g; double bd = 255.0 - b; r += (rd * p) / 100.0; g += (gd * p) / 100.0; b += (bd * p) / 100.0; return createColor((int) r, (int) g, (int) b); } public static final Color createColor(int r, int g, int b) { return new Color(((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0)); } }