This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: colorsys.py function rgb_to_hls
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: David.Hood, mark.dickinson
Priority: normal Keywords:

Created on 2010-07-03 12:33 by David.Hood, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg109181 - (view) Author: David Hood (David.Hood) Date: 2010-07-03 12:33
colorsys.py function rgb_to_hls will crash on the RGB color (0,2,1) on line 68 with a division by zero error.
68 else: s = (maxc-minc) / (2.0-maxc-minc)
msg109231 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-07-04 16:13
I think the arguments to rgb_to_hls are supposed to be floats in the range [0.0, 1.0].
msg109297 - (view) Author: David Hood (David.Hood) Date: 2010-07-05 04:45
And Mark would seem to be entirely correct in this.
Colour me embarrassed for missing that one.
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53395
2010-07-05 04:45:27David.Hoodsetstatus: open -> closed

messages: + msg109297
2010-07-04 16:13:38mark.dickinsonsetnosy: + mark.dickinson
messages: + msg109231
2010-07-03 21:14:35brian.curtinsetversions: + Python 2.7, - Python 2.6
type: crash -> behavior
components: + Library (Lib)
stage: test needed
2010-07-03 12:33:01David.Hoodcreate