Skip to content

Changing to custom colors error #182

@khaume

Description

@khaume

Downloaded latest version and used on Ubuntu 18.04. I got an error when trying to change to custom colors:

Traceback (most recent call last): File "/home/khaume/Downloads/numix-folders-master/gui/gui", line 351, in colourbutton_changed self.colour[arg] = gdk_to_hex(colour) File "/home/khaume/Downloads/numix-folders-master/gui/gui", line 33, in gdk_to_hex return "#" + "".join(["%02x" % (colour * 255) for colour in colours]) File "/home/khaume/Downloads/numix-folders-master/gui/gui", line 33, in <listcomp> return "#" + "".join(["%02x" % (colour * 255) for colour in colours]) TypeError: %x format: an integer is required, not float

I changed line 33 in gui/gui to cast the color to int, which solved it:

return "#" + "".join(["%02x" % int(colour * 255) for colour in colours])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions