de.hillenbrand.util
Class ColorUtils
java.lang.Object
de.hillenbrand.util.ColorUtils
public final class ColorUtils
- extends java.lang.Object
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 |
ColorUtils
public ColorUtils()
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 addeddH
- the offset for huedS
- the offset for saturationdB
- the offset for brightness
- Returns:
- Color with modified HSV values
makeDarker
public static final java.awt.Color makeDarker(java.awt.Color c,
int value)