import java.awt.*;

public class CameraLike extends ColorScheme {

    public CameraLike() {
	schemename= "CameraLike";
    }

    public Color getColor(double scaledI) {
	double I = scaledI;
	double hue=0.0, sat=0.0, bri=0.0;

	if(I < 0.0) I=0.0;
	if(I > 1.0) I=1.0;
	

	if(I < 0.2) {
	    hue = 0.8;
	    sat = 1.0;
	    bri = I/0.2;
	}

	if(I >= 0.2 && I < 0.8) {
	    hue = (0.8 - I)*0.8/0.6;
	    sat = 1.0;
	    bri = 1.0;
	}

	if(I >= 0.8) {
	    hue = 0.0;
	    sat = (1.0 - I)/0.2;
	    bri = 1.0;
	}

	
	return Color.getHSBColor((float) hue, (float) sat, (float) bri);
           
    }
}
