How can I use the HSL colorspace in Java?

color-space, hsl, java

Solution

I found the built-in method for HSB (which is not the same as HSL, but is similar)

[Color.getHSBColor(float h, float s, float b)](http://docs.oracle.com/javase/7/docs/api/java/awt/Color.html#getHSBColor(float,%20float,%20float))

Problem

I've had a look at the ColorSpace class, and found the constant `TYPE_HLS` (which presumably is just HSL in a different order). Can I use this constant to create a `Color` from hue, saturation, and luminosity? If not, are there any Java classes for this, or do I need to write my own?

Original source