1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Colour: Fix comparisons in HSL conversions

This commit is contained in:
reuk 2021-06-23 12:07:22 +01:00
parent 7a592bd6c2
commit 0c56fa8fa0
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -82,12 +82,12 @@ namespace ColourHelpers
lightness = ((float) (hi + lo) / 2.0f) / 255.0f;
if (lightness < 0.0f)
if (lightness <= 0.0f)
return;
hue = getHue (col);
if (1.0f < lightness)
if (1.0f <= lightness)
return;
auto denominator = 1.0f - std::abs ((2.0f * lightness) - 1.0f);