thothbot / parallax

Cross-platform Java 3D SDK
http://thothbot.github.io
MIT License
84 stars 26 forks source link

Color: setting color by hsl and fixing l results in almost identical colors #51

Open borttrob opened 8 years ago

borttrob commented 8 years ago

Hello *,

just started to use parallax library (Great job by the way) and encountered the following problem. If I fix the light parameter when setting a color by HSL, it results in almost the same RGB colors. Please see the following code as an example.

 public static void main(String[] args) {

        final Random random1 = new Random(1);
        final Color color1 = new Color();
        color1.setHSL(random1.nextFloat(), random1.nextFloat(), 0.5f);

        final Random random2 = new Random(2);
        final Color color2 = new Color();
        color2.setHSL(random2.nextFloat(), random2.nextFloat(), 0.5f);

        System.out.println("Color1: " + color1);
        System.out.println("Color2: " + color2);
    }

Thanks

thothbot commented 8 years ago

Thank you for your report, this will be fixed in 2.0