![]() ![]() ![]() ![]() I've tested all three with a few RGB values and they seem to produce similar (if not exact) results. This is from another wiki page that's in Dutch:Īnd this is from the answers to "HSL to RGB color conversion": case r: h = (g - b) / d + (g < b ? 6 : 0) break // d = max-min = c See the calculation from the "HSL and HSV" page: I'm stuck at the calculation of hue if the R is the max value. Later, I've rewritten the function from the "HSL to RGB color conversion" using the calculations from the "HSL and HSV" page. To understand it better, I've read the HSL and HSV on Wikipedia. While it provides a function to do conversion from RGB to HSL, I see no explanation to what's really going on in the calculation. When I searched SO for a way to do the conversion, I found this question HSL to RGB color conversion. I'm creating a Color Picker tool and for the HSL slider, I need to be able to convert RGB to HSL. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |