Bug in ColorHSL.fromColor() [resolved]

sign up sign in

It looks like there's a small bug in ColorHSL.fromColor(). This function takes an RGB color and translates it to HSL format.

Currently after calculating the new values in temp variables _h, _s, and _l, the function assigns _h to everything, like so:

        h = _h;
        s = _h;
        l = _h;
        a = _color.a;

When really it should be like this:

        h = _h;
        s = _s;
        l = _l;
        a = _color.a;

This section starts at line 439 of Color.hx

I saw some strange behavior converting RGB to HSL, and this fixed it.