Here you can find the source of darker(Color c)
public static Color darker(Color c)
//package com.java2s; import java.awt.Color; public class Main { /**/*from w w w. jav a 2 s. c o m*/ * This is a weaker version of {@link Color#brighter()} * Uses a factor closer to 1. * @see Color#darker() * @return darker Color */ public static Color darker(Color c) { float[] hsb = new float[3]; int r = c.getRed(); int g = c.getGreen(); int b = c.getBlue(); Color.RGBtoHSB(r, g, b, hsb); //System.out.println("Saturation: " + hsb[1] + " -> " + (hsb[1] * 0.95f)); //System.out.println("Brightness: " + hsb[2] + " -> " + (hsb[2] * 0.95f)); return Color.getHSBColor(hsb[0], hsb[1] * 0.7f, hsb[2] * 0.95f); } }