summaryrefslogtreecommitdiffstats
path: root/Lib/colorsys.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/colorsys.py')
-rw-r--r--Lib/colorsys.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/colorsys.py b/Lib/colorsys.py
index 9bdc83e..bc897bd 100644
--- a/Lib/colorsys.py
+++ b/Lib/colorsys.py
@@ -83,7 +83,7 @@ def rgb_to_hls(r, g, b):
if l <= 0.5:
s = rangec / sumc
else:
- s = rangec / (2.0-sumc)
+ s = rangec / (2.0-maxc-minc) # Not always 2.0-sumc: gh-106498.
rc = (maxc-r) / rangec
gc = (maxc-g) / rangec
bc = (maxc-b) / rangec