Browse Source

Colour: Fix comparisons in HSL conversions

v6.1.6
reuk 4 years ago
parent
commit
0c56fa8fa0
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_graphics/colour/juce_Colour.cpp

+ 2
- 2
modules/juce_graphics/colour/juce_Colour.cpp 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);


Loading…
Cancel
Save