An "oldie" from Bob Powell: [
^]: "The conversion of HSL to RGB is a well known algorithm that you can find in numerous places on the web. Oddly enough, down in the bowels of the ControlPaint class, RGB to HSL is employed when you use the ControlPaint.Light(�) or ControlPaint.DarkDark(�) methods but also unfortunately the scaling of the Light, Dark and DarkDark settings are, to say the least, brutal and offer no finesse."
Bob's article has C# code for HSL => RGB.
The EasyRGB web-site is a good professional resource on color-space information: [
^].
Adobe products use HSB (aka HSV) color-space, rather than HSL; there is a difference: [
^].
Another great resource for color schemes (not from Adobe) is Petr Stanicek's ColorSchemeDesigner: [
^], imho a masterpiece of a JavaScript based web-application. This facility does not deal with HSV/B, or HSL, specifically.
There are those who assert .NET's HSL conversion algorithms do not follow the NTSC standards, and are inferior: [
^] ... see comments by Itai Bar-Heim, and others.
If what you are after is calculating what color for text overlaid on another color would be most readable (perceptual/relative luminance) given the human eye's greater "weighting" towards perception of green, and lower weighting for perception of blue, etc.: [
^].