New submission from Madhavendra Sharma: Calculations in rgb_to_hls at line number 67 in python version 2.7.3 for "h" the hue component are not correct according reference mentioned in the same source file "en.wikipedia.org/wiki/HSV_color_space".
code snippet: if r == maxc: #h = (bc-gc) #current code h = (bc-gc)%6 # suggestion elif g == maxc: h = 2.0+rc-bc else: #h = 4.0+gc-rc #current code h = 4.0+rc-gc # suggestion #h = (h/6.0) % 1.0 not required # h = 60 *h # component should be multiplied by 60 but it depends on user ---------- messages: 288410 nosy: madhavendra.sharma priority: normal severity: normal status: open title: rgb_to_hls to colorsys.py type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29629> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com