In addition to secretGeek's answer, to get a color from HSL values (or vice-versa), you can also use these native function calls (sample code in Visual Basic):
Public Declare Sub ColorRGBToHLS Lib "shlwapi.dll" _
(ByVal clrRGB As UInteger, _
ByRef pwHue As Short, _
ByRef pwLuminance As Short, _
ByRef pwSaturation As Short)
Public Declare Function ColorHLSToRGB Lib "shlwapi.dll" _
(ByVal wHue As Short, _
ByVal wLuminance As Short, _
ByVal wSaturation As Short) As UInteger
(using ColorTranslator.ToWin32 and ColorTranslator.FromWin32 when passing/receiving the color argument/result)