Here you can find the source of getDefaultBackgroundColor(Color color)
static Color getDefaultBackgroundColor(Color color)
//package com.java2s; import javax.swing.plaf.ColorUIResource; import java.awt.*; public class Main { static Color getDefaultBackgroundColor(Color color) { Color backIDE;//from w ww . jav a2s. c o m // Check for the 'Classic' control color if ((color.getRed() == 212) && (color.getGreen() == 208) && (color.getBlue() == 200)) { // Use the exact background for this color backIDE = new ColorUIResource(247, 243, 233); } else if ((color.getRed() == 236) && (color.getGreen() == 233) && (color.getBlue() == 216)) { // Check for the 'XP' control color // Use the exact background for this color backIDE = new ColorUIResource(255, 251, 233); } else { // Calculate the IDE background color as only half as dark as the control color int r = color.getRed() + 35; int g = color.getGreen() + 35; int b = color.getBlue() + 35; if (r >= 255) r = 255; if (g >= 255) g = 255; if (b >= 255) b = 255; backIDE = new ColorUIResource(r, g, b); } return backIDE; } }