public class ColorOp
extends java.lang.Object
| Constructor and Description |
|---|
ColorOp() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Color |
gray(int brightness)
Returns a gray color with red, green and blue set to the given value.
|
static java.awt.Color |
modColor(float fac,
java.awt.Color color)
Returns the given Color modulated with the given brightness factor.
|
static java.awt.Color |
modColor(float fac,
java.awt.Color color,
int useAlpha)
Returns the given Color modulated with the given brightness factor.
|
public static java.awt.Color modColor(float fac,
java.awt.Color color,
int useAlpha)
fac - brightness factor. The range is from 0 (black) over 1 (original) to 2 (white)color - the Color which used to be modulateduseAlpha - if smaller than zero, then the colors alpha is used. Otherwise the given alpha value is used.public static java.awt.Color modColor(float fac,
java.awt.Color color)
fac - brightness factor. The range is from 0 (black) over 1 (original) to 2 (white)color - the Color which used to be modulatedpublic static java.awt.Color gray(int brightness)
brightness - the brightness of the gray value with 0=black and 255=white.