New submission from Bryan Oakley <>:

Even though the underlying tcl/tk interpreter is returning ints, askcolor is 
converting the values to floats. My guess is this is an oversight related to 
the change in functionality of the / operator in python3.


    return (r/256, g/256, b/256), str(result)

should probably be this:

    return (r//256, g//256, b//256), str(result)

components: Tkinter
messages: 315367
nosy: Bryan.Oakley
priority: normal
severity: normal
status: open
title: askcolor is returning floats for r,g,b values instead of ints
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

Python tracker <>
Python-bugs-list mailing list

Reply via email to