|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectColorOps
public class ColorOps
A noninstantiable utility class to manipulate Color objects.
Constructor Summary | |
---|---|
ColorOps()
|
Method Summary | |
---|---|
static java.awt.Color |
darken(java.awt.Color c)
return a darker version of the given Color |
static java.awt.Color |
getBrightColor()
Return a bright, saturated Color with a random hue |
static java.awt.Color |
getBrightColor(double d)
Return a bright, saturated Color with a hue based on d |
static java.awt.Color |
interpolate(java.awt.Color c1,
java.awt.Color c2,
float n)
Linearly interpolates between two colors based on n. |
static java.awt.Color |
lighten(java.awt.Color c)
return a lighter version of the given Color |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorOps()
Method Detail |
---|
public static java.awt.Color darken(java.awt.Color c)
c
- the Color to darken
public static java.awt.Color lighten(java.awt.Color c)
c
- the Color to lighten
public static java.awt.Color interpolate(java.awt.Color c1, java.awt.Color c2, float n)
c1
- the first Colorc2
- the second Colorn
- the ratio of c2 to use
public static java.awt.Color getBrightColor()
public static java.awt.Color getBrightColor(double d)
d
- the location along the rainbow to choose
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |