|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.util.Colors
public final class Colors
Some fields and methods that make life easier when dealing with Colors.
Method Summary | |
---|---|
static Color |
between(Color a,
Color b,
double value)
Creates a color which "lies between" the colors a
and b |
static Color |
between(Color a,
double weightA,
Color b,
double weightB,
Color c,
double weightC)
Creates a color that "lies between" the colors a , b and
c . |
static Color |
brighter(Color color)
Helper methods calling Color.brighter() . |
static Color |
brighter(Color c,
double value)
Increases the brightness of a color. |
static Color |
darker(Color color)
Helper methods calling Color.darker() . |
static Color |
darker(Color c,
double value)
Decreases the brightness of a color. |
static Color |
deltaBrightness(Color c,
double delta)
Converts c into HSB and adds delta to the brightness. |
static Color |
diffMirror(Color color,
double factor)
|
static Color |
fuller(Color color,
double factor)
|
static Color |
middle(Color a,
Color b)
|
static Color |
undiffMirror(Color color,
double factor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Color darker(Color c, double value)
c
- the color which will be made darkervalue
- how much darker the color should be, 1 means black, 0
means c
is returned
c
public static Color brighter(Color c, double value)
c
- the color which will be made brightervalue
- how much brighter the color should be, 1 means
white, 0 means c
is returned
c
public static Color deltaBrightness(Color c, double delta)
c
into HSB and adds delta
to the brightness.
c
- the color to convertdelta
- the delta in brightness
public static Color between(Color a, Color b, double value)
a
and b
a
- the first colorb
- the second colorvalue
- a value between 0 and 1, 0 means a
is returned,
1 means b
is returned
a
and b
public static Color between(Color a, double weightA, Color b, double weightB, Color c, double weightC)
a
, b
and
c
. Each color has a weight, and as higher the weight as more of that color
is inside the created color.
a
- the first color to incooperateweightA
- how much of a
goes into the resulting colorb
- the second color to incooperateweightB
- how much of b
goes into the resulting colorc
- the third color to incooperateweightC
- how much of c
goes into the resulting color
(a * weightA + b * weightB + c * weightC) / (weightA + weightB + weightC)
public static Color middle(Color a, Color b)
public static Color fuller(Color color, double factor)
public static Color undiffMirror(Color color, double factor)
public static Color diffMirror(Color color, double factor)
public static Color darker(Color color)
Color.darker()
.
color
- some color to modify, can be null
null
public static Color brighter(Color color)
Color.brighter()
.
color
- some color to modify, can be null
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |