dont crash on alpha channel

This commit is contained in:
xfnw 2020-12-19 09:31:52 -05:00
parent 7e7357ac49
commit c9ca26a975

View file

@ -117,7 +117,10 @@ COLORS = colors
def closestColor(rgb):
try:
r, g, b = rgb
except ValueError:
r, g, b, a = rgb
diss = {}
for cc in COLORS:
rc, gc, bc = COLORS[cc]