Skip to content

Commit

Permalink
[gui] [bug] Fix hex_to_rgb (#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanming-hu authored Aug 2, 2020
1 parent 81437d6 commit c89c2a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/taichi/misc/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def rgb_to_hex(c):
return 65536 * to255(c[0]) + 256 * to255(c[1]) + to255(c[2])


def hex_to_rgb(c):
def hex_to_rgb(color):
r, g, b = (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff
return r / 255, g / 255, b / 255

Expand Down

0 comments on commit c89c2a4

Please sign in to comment.