enthought / enthought/Python-2.7.3

ZeroDivisionError in Python-2.7.3/Lib/colorsys.py

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3
Forks
12
PR merge metrics
No merged PRs in 30d

Description

line 77 in rgb_to_hls divides by 2.0-maxc-minc which is sometimes zero.
Fix by inserting before line 74
if (2.0-maxc-minc) == 0:
return(0.0, l, 0.0)
similar to lines 72-73.
Error also exists in python 3 library.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.