com.threerings.media.image
Class ColorUtil

java.lang.Object
  extended by com.threerings.media.image.ColorUtil

public class ColorUtil
extends Object

Utilities to manipulate colors.


Constructor Summary
ColorUtil()
           
 
Method Summary
static Color blend(Color c1, Color c2)
          Blends the two supplied colors.
static Color blend(Color c1, Color c2, float firstperc)
          Blends the two supplied colors, using the supplied percentage as the amount of the first color to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorUtil

public ColorUtil()
Method Detail

blend

public static final Color blend(Color c1,
                                Color c2)
Blends the two supplied colors.

Returns:
a color halfway between the two colors.

blend

public static final Color blend(Color c1,
                                Color c2,
                                float firstperc)
Blends the two supplied colors, using the supplied percentage as the amount of the first color to use.

Parameters:
firstperc - The percentage of the first color to use, from 0.0f to 1.0f inclusive.