I figured I should post this question, even if I have already found a solution, as a Java implementation was not readily available when I searched for it.
Using HSV
Use ColorUtils which provides
HSLToColor(float\[\] hsl)
And
[RGBToHSL(int r, int g, int b, float\[\] hsl)]
Methods which are very easy to convert to each other!
For example:
float[] hsl = new float[]{1.5, 2.0, 1.5};
int color = ColorUtils.HSLToColor(hsl);
Now get the color
float[] hslStub = new float[3];
float[] hslFromColor = ColorUtils.colorToHSL(color, hslStub);
Now get the hsl
Here is the sourcecode.