I\'m trying to convert RGB to HSL and I also want to convert from HSL to RGB, I have written a class for it but if I do RGB->HSL->RGB to try if it works I get a different va
Common bug. You've got
public static HSLColor FromRGB(Byte R, Byte G, Byte B) { float _R = (R / 255); float _G = (G / 255); float _B = (B / 255);
Tell me precisely what values of R can result in _R not being 0. (Hint: there's only one).
Edit: you've got the same problem in ToRGB() with 1/3.