rgb2hex now allows lists as input

pull/60/head
Andy 2018-06-10 14:41:27 -07:00
parent 850055fa57
commit 31a8d2ac11
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ def rgb2hex(rgb):
>>> rgb2hex((0,0,255)) >>> rgb2hex((0,0,255))
'#0000FF' '#0000FF'
""" """
return ('#%02x%02x%02x' % rgb).upper() return ('#%02x%02x%02x' % tuple(rgb)).upper()
def isclose(a, b, rtol=1e-5, atol=1e-8): def isclose(a, b, rtol=1e-5, atol=1e-8):