class ColorHelper {

    public static BufferedImage getColorSpaceImage(){
        BufferedImage colorSpace = new BufferedImage(150,250, BufferedImage.TYPE_INT_RGB);
        Graphics g2 = colorSpace.getGraphics();

        double dh = (double) DEGREES / (colorSpace.getHeight() - 1);
        double dl = 1.0 / (colorSpace.getWidth() - 1);

        g2.setColor(Color.red);
        g2.fillRect(0, 0, colorSpace.getWidth(), colorSpace.getHeight());
        int x, y;
        double h, s, l;
        s = 0.5f;
        for (x = 0; x < colorSpace.getWidth(); x++) {
            l = (x * dl);
            for (y = 0; y < colorSpace.getHeight(); y++) {
                h = dh*y;
                Color hslColor = ColorHelper.getColorFromHSL(h, s, l);
                g2.setColor(hslColor);
                g2.fillRect(x, y, 1, 1);
            }
        }

        return colorSpace;
    }

    private  ColorHelper();

}