Is there an algorithm for converting a RGB byte array to an HSL float array and back again?
I have tried the one found here but it seems to have bugs.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I use the following class which converts from HSL to RGB and vice-versa. You can construct a
ColorRGBinstance from aColor, or simply cast one. It exposesH,S,Lproperties also. I found it on the internet. Apologies to the original author, I cannot find a reference: