Fix rgbToHsl; returned faulty luminance in some situations