package taberion;

import java.awt.Color;

public final class TColorCreator{
 
 public static final Color getColorFromRange(Color max, Color min, float amount)
    {
        ////System.out.println(amount);
        int redMin = min.getRed();
        int greenMin = min.getGreen();
        int blueMin = min.getBlue();
        
        int redMax = max.getRed();
        int greenMax = max.getGreen();
        int blueMax = max.getBlue();
        
        Float red = new Float(redMin + (redMax - redMin)*amount);
        Float green = new Float(greenMin + (greenMax - greenMin)*amount);
        Float blue = new Float(blueMin + (blueMax - blueMin)*amount);
        
        return new Color(red.intValue(), green.intValue(), blue.intValue()); 
    }
}