class ExtendedColor extends Color {

    /**
     * a type of extended color.
     */
    public static final int TYPE_RGB = 0;
    /**
     * a type of extended color.
     */
    public static final int TYPE_GRAY = 1;
    /**
     * a type of extended color.
     */
    public static final int TYPE_CMYK = 2;
    /**
     * a type of extended color.
     */
    public static final int TYPE_SEPARATION = 3;
    /**
     * a type of extended color.
     */
    public static final int TYPE_PATTERN = 4;
    /**
     * a type of extended color.
     */
    public static final int TYPE_SHADING = 5;
    /**
     * the max int color value (255) expressed in int
     */
    public static final int MAX_COLOR_VALUE = 0xFF;
    /**
     * the max int color value (255) expressed in float
     */
    public static final float MAX_INT_COLOR_VALUE = 0xFF;
    /**
     * the max float color value (1) expressed in float
     */
    public static final float MAX_FLOAT_COLOR_VALUE = 0x1;
    private static final long serialVersionUID = 2722660170712380080L;
    protected int type;

    /**
     * Constructs an extended color of a certain type.
     *
     * @param type {@link ExtendedColor#type}
     */
    public ExtendedColor(int type) {
        super(0, 0, 0);
        this.type = type;
    }

    /**
     * Constructs an extended color of a certain type and a certain color.
     *
     * @param type  {@link ExtendedColor#type}
     * @param red   red quotient
     * @param green green quotient
     * @param blue  blue quotient
     */
    public ExtendedColor(int type, float red, float green, float blue) {
        this(type, normalize(red), normalize(green), normalize(blue), MAX_FLOAT_COLOR_VALUE);
    }

    /**
     * Constructs an extended color of a certain type and a certain color.
     *
     * @param type  {@link ExtendedColor#type}
     * @param red   red quotient
     * @param green green quotient
     * @param blue  blue quotient
     * @param alpha alpha quotient
     */
    public ExtendedColor(int type, float red, float green, float blue, float alpha) {
        super(normalize(red), normalize(green), normalize(blue), normalize(alpha));
        this.type = type;
    }

    /**
     * Gets the type of a given color.
     *
     * @param color an object of {@link Color}
     * @return one of the types (see constants)
     */
    public static int getType(Color color) {
        if (color instanceof ExtendedColor) {
            return ((ExtendedColor) color).getType();
        }
        return TYPE_RGB;
    }

    static final float normalize(float value) {<FILL_FUNCTION_BODY>}

    static final int normalize(int value) {
        if (value < 0) {
            return 0;
        }
        if (value > (int) MAX_INT_COLOR_VALUE) {
            return (int) MAX_INT_COLOR_VALUE;
        }
        return value;
    }

    /**
     * Gets the type of this color.
     *
     * @return one of the types (see constants)
     */
    public int getType() {
        return type;
    }
}

        if (value < 0f) {
            return 0f;
        }
        if (value > MAX_FLOAT_COLOR_VALUE) {
            return MAX_FLOAT_COLOR_VALUE;
        }
        return value;
    
<methods>public void <init>(int) ,public void <init>(int, boolean) ,public void <init>(int, int, int) ,public void <init>(float, float, float) ,public void <init>(java.awt.color.ColorSpace, float[], float) ,public void <init>(int, int, int, int) ,public void <init>(float, float, float, float) ,public static int HSBtoRGB(float, float, float) ,public static float[] RGBtoHSB(int, int, int, float[]) ,public java.awt.Color brighter() ,public synchronized java.awt.PaintContext createContext(java.awt.image.ColorModel, java.awt.Rectangle, java.awt.geom.Rectangle2D, java.awt.geom.AffineTransform, java.awt.RenderingHints) ,public java.awt.Color darker() ,public static java.awt.Color decode(java.lang.String) throws java.lang.NumberFormatException,public boolean equals(java.lang.Object) ,public int getAlpha() ,public int getBlue() ,public static java.awt.Color getColor(java.lang.String) ,public static java.awt.Color getColor(java.lang.String, java.awt.Color) ,public static java.awt.Color getColor(java.lang.String, int) ,public float[] getColorComponents(float[]) ,public float[] getColorComponents(java.awt.color.ColorSpace, float[]) ,public java.awt.color.ColorSpace getColorSpace() ,public float[] getComponents(float[]) ,public float[] getComponents(java.awt.color.ColorSpace, float[]) ,public int getGreen() ,public static java.awt.Color getHSBColor(float, float, float) ,public int getRGB() ,public float[] getRGBColorComponents(float[]) ,public float[] getRGBComponents(float[]) ,public int getRed() ,public int getTransparency() ,public int hashCode() ,public java.lang.String toString() <variables>public static final java.awt.Color BLACK,public static final java.awt.Color BLUE,public static final java.awt.Color CYAN,public static final java.awt.Color DARK_GRAY,private static final double FACTOR,public static final java.awt.Color GRAY,public static final java.awt.Color GREEN,public static final java.awt.Color LIGHT_GRAY,public static final java.awt.Color MAGENTA,public static final java.awt.Color ORANGE,public static final java.awt.Color PINK,public static final java.awt.Color RED,public static final java.awt.Color WHITE,public static final java.awt.Color YELLOW,public static final java.awt.Color black,public static final java.awt.Color blue,private java.awt.color.ColorSpace cs,public static final java.awt.Color cyan,public static final java.awt.Color darkGray,private float falpha,private float[] frgbvalue,private float[] fvalue,public static final java.awt.Color gray,public static final java.awt.Color green,public static final java.awt.Color lightGray,public static final java.awt.Color magenta,public static final java.awt.Color orange,public static final java.awt.Color pink,public static final java.awt.Color red,private static final long serialVersionUID,int value,public static final java.awt.Color white,public static final java.awt.Color yellow