bibliothek.util
Class Colors

java.lang.Object
  extended by bibliothek.util.Colors

public final class Colors
extends Object

Some fields and methods that make life easier when dealing with Colors.

Version:
1.0
Author:
Benjamin Sigg

Method Summary
static Color between(Color a, Color b, double value)
          Creates a color which "lies between" the colors a and b
static Color brighter(Color c, double value)
          Increases the brightness of a color.
static Color darker(Color c, double value)
          Decreases the brightness of a color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

darker

public static Color darker(Color c,
                           double value)
Decreases the brightness of a color.

Parameters:
c - the color which will be made darker
value - how much darker the color should be, 1 means black, 0 means c is returned
Returns:
a color which is darker than c

brighter

public static Color brighter(Color c,
                             double value)
Increases the brightness of a color.

Parameters:
c - the color which will be made brighter
value - how much brighter the color should be, 1 means white, 0 means c is returned
Returns:
a color which is brighter than c

between

public static Color between(Color a,
                            Color b,
                            double value)
Creates a color which "lies between" the colors a and b

Parameters:
a - the first color
b - the second color
value - a value between 0 and 1, 0 means a is returned, 1 means b is returned
Returns:
a color whose rgb-values are between the rgb-values of a and b