package express.color;

import java.awt.Color;

public class HSBColor extends Color {

    float[] hsv = new float[3];

	public HSBColor(int r, int g, int b) {
		super(r, g, b);
	}

    public HSBColor(int c) {
		super(c);
	}

    public HSBColor(float r, float g, float b) {
        super(r, g, b);
	}

	public float getHue() {
	    hsv = RGBtoHSB(this.getRed(), this.getGreen(), this.getBlue(), hsv);
        return hsv[0];
	}

	public float getSaturation() {
	    hsv = RGBtoHSB(this.getRed(), this.getGreen(), this.getBlue(), hsv);
        return hsv[1];
	}

	public float getBrightness() {
	    hsv = RGBtoHSB(this.getRed(), this.getGreen(), this.getBlue(), hsv);
        return hsv[2];
	}

}


