de.hillenbrand.util
Class ColorUtils

java.lang.Object
  extended by de.hillenbrand.util.ColorUtils

public final class ColorUtils
extends java.lang.Object


Constructor Summary
ColorUtils()
           
 
Method Summary
static java.awt.image.BufferedImage createTranslucentImage(int width, int height)
           
static java.awt.Color deriveColorAlpha(java.awt.Color base, int alpha)
           
static java.awt.Color deriveColorHSB(java.awt.Color base, float dH, float dS, float dB)
          Derives a color by adding the specified offsets to the base color's hue, saturation, and brightness values.
static java.awt.Color makeDarker(java.awt.Color c, int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorUtils

public ColorUtils()
Method Detail

createTranslucentImage

public static java.awt.image.BufferedImage createTranslucentImage(int width,
                                                                  int height)

deriveColorAlpha

public static java.awt.Color deriveColorAlpha(java.awt.Color base,
                                              int alpha)

deriveColorHSB

public static final java.awt.Color deriveColorHSB(java.awt.Color base,
                                                  float dH,
                                                  float dS,
                                                  float dB)
Derives a color by adding the specified offsets to the base color's hue, saturation, and brightness values. The resulting hue, saturation, and brightness values will be contrained to be between 0 and 1.

Parameters:
base - the color to which the HSV offsets will be added
dH - the offset for hue
dS - the offset for saturation
dB - the offset for brightness
Returns:
Color with modified HSV values

makeDarker

public static final java.awt.Color makeDarker(java.awt.Color c,
                                              int value)