Class ColorInterpolator
- java.lang.Object
-
- org.hortonmachine.gears.utils.colors.ColorInterpolator
-
public class ColorInterpolator extends Object
A color interpolation helper class.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description ColorInterpolator(Color[] colors, double[] values, int alpha)ColorInterpolator(String colorTableName, double min, double max, Integer alpha)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColorFor(double value)Get the color of the defined table by its value.static ColorinterpolateColor(Color color1, Color color2, float fraction)Interpolate a color at a given fraction between 0 and 1.
-
-
-
Method Detail
-
getColorFor
public Color getColorFor(double value)
Get the color of the defined table by its value.- Parameters:
value- the value.- Returns:
- the interpolated color.
-
-