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.

Author madhavendra.sharma
Recipients madhavendra.sharma
Date 2017-02-23.05:55:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487829334.94.0.604148512015.issue29629@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-02-23 05:55:34madhavendra.sharmasetrecipients: + madhavendra.sharma
2017-02-23 05:55:34madhavendra.sharmasetmessageid: <1487829334.94.0.604148512015.issue29629@psf.upfronthosting.co.za>
2017-02-23 05:55:34madhavendra.sharmalinkissue29629 messages
2017-02-23 05:55:34madhavendra.sharmacreate